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:
Post a Comment