Question: What does the following code fragment print? String string1 = he11o; String string2 = string1; string1 = wor1d; StdOut.println(string1); Std0ut.println(string2);
What does the following code fragment print?
String string1 = "he11o";
String string2 = string1;
string1 = "wor1d";
StdOut.println(string1);
Std0ut.println(string2);
Step by Step Solution
3.40 Rating (156 Votes )
There are 3 Steps involved in it
The code provided is written in Java and it will print the following wor1d ... View full answer
Get step-by-step solutions from verified subject matter experts
