Java String Manipulation Interview Questions with Answers - 1
Question: 1
What is string pool?
String Pool is a pool of strings stored in Java heap memory. We know that Strings is special class in java
and we can create String object using new operator as well as providing values in double quotes.
Question: 2
Define immutable object?
An immutable object can’t be changed once it is created.
Question: 3
What is string subsequence method?
Java 1.4 introduced Char Sequence interface and String implements this interface, this is the only reason for the implementation of sub Sequence method in String class.
Internally it invokes the String substring method.
Question: 4
Why string buffer is called mutable?
The string class is considered as immutable; so that once it is created a String object cannot be changed.
If there is a necessity to make a lot of modifications to Strings of characters then StringBuffer should be used.
Electromagnetic Induction Questions & Answers Pdf More
A.C. Basics and Networks Quiz Questions & Answers Pdf More
Signals and Systems Quiz Questions and Answers Pdf More
Signals and Systems MCQ Questions and Answers Pdf More
Electrical Power Sources Quiz Questions & Answers Pdf More
100+ Statement and Argument Online Test More
Computer Instructor Previous Year Question Papers More
100+ Time and Work Questions for SBI, IBPS Bank PO Exams More
7000+ GATE ECE Question Bank Pdf More
TNPSC Indian History MCQ Questions and Answers 2020-2021 More