Java - Memory Management Basics
Find the problem in this code:
String s1 = "Java"; String s2; s2 = s1; s1 = null; System.out.println(s2.length());
String s1 = "Java"; String s2; s2 = s1; s1 = null; System.out.println(s2.length());
15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions