Send me some interview questions on Stringhandling concept.

Showing Answers 1 - 4 of 4 Answers

Akshay Dev Vankhede

  • Jul 21st, 2006
 

Whenever it comes to string handling in java the following questions are frequently asked,
1. What do you mean by immutability? And how can one make an immutable class?
2. What are the performence tradeoffs between string concatenation and appending strings in StringBuffer?
3. What if i use .equals method with two strings with same content and the same for StringBuffer? Justify your answer.
I'm not giving answers to these questions hereby, You just try to answer these questions and email me.

  Was this answer useful?  Yes

Gaurav

  • Jul 24th, 2006
 

Regarding use of equals on StringBuffer and String : Since StringBuffer diesn't override equals therefore such a comparison will always give false in case of StringBuffer.

  Was this answer useful?  Yes

suseela

  • Aug 9th, 2006
 

"==" will compare string objects and returns true r false.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions