Search Interview Questions
| More than 3000 questions in repository.|
There are more than 900 unanswered questions.
Click here and help us by providing the answer.
Have a video suggestion.
Click Correct / Improve and please let us know.
|Interview Questions and Answers|
|Ans. We can use String getBytes() method to convert String to byte array and we can use String constructor new String(byte arr) to convert byte array to String.|
|Help us improve. Please let us know the company, where you were asked this question :|
|Like Discuss Correct / Improve  java   string class   string|
|Why is String immutable in Java ?|
| Explain the scenerios to choose between String , StringBuilder and StringBuffer ?|
What is the difference between String , StringBuilder and StringBuffer ?
|Why Char array is preferred over String for storing password?|
|What are different ways to create String Object? Explain.|
|What is a String Pool ?|
|Which String class does not override the equals() and hashCode() methods, inheriting them directly from class Object?|
|What is the difference between StringBuffer and String class ?|
|What is an immutable class ?|
|Difference between StringBuffer and StringBuilder ?|
|What does String intern() method do?|