Tuesday, 10 October 2017

JAVA : STRINGS : TRICKY QUESTIONS

JAVA : STRINGS : TRICKY QUESTIONS


1. Is s2.rotation(s1)....?




2. Is 2 strings are Anagram..?

3. String.join() method

4. String -> equals and ==



5. 




6. How many objects will create

String s1 = new String("abc");
String s2 = new String("abc");

Ans : 3 (1 in StringPool, 2 objects in heap)



7.




8. 


























No comments:

Post a Comment