Java - Memory Management Basics
What will be printed by the following code?
String str1 = "Good"; String str2 = str1; str2 = "Morning"; System.out.println(str1);
String str1 = "Good"; String str2 = str1; str2 = "Morning"; System.out.println(str1);
15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions