Tech Me More

To quench our thirst of sharing knowledge about our day to day experience & solution to techincal problems we face in our projects.

Advertise with us !
Send us an email at diehardtechy@gmail.com

Monday, April 7, 2014

OCJP practice question #6

String Tricky Question 


Solution: Option 4 is correct.
 " " in the System.out.println statement is empty String which is getting concatenated with s2. So new resultant will be stored in new location making a new Object, as String is immutable in java.

For more clarification Comment your queries in comment section of this post.

Happy learning :) 

No comments: