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.
7000+ TNPSC Group 1, 2, 4, VAO Indian Economy Study Materials Pdf More
7000+ Gate Computer Science Engineering Previous Year Questions More
7000+ Fill in the Blanks with Suitable Homonyms More
7000+ Fill in the Blanks with Suitable Homophones More
Power Semiconductor Device and Integrated Circuits MCQ Questions Pdf More
Mechanics and Properties of Matter in Physics for TNPSC Pdf More
Comparison of Ranks Verbal Reasoning Questions and Answers More
Sql Server Database Interview Questions and Answers More
PG TRB Chemistry Study Materials 2020-2021 More
Vocabulary Test Questions and Answers More