What does the following code print out:
String myStringVar = “Good Morning”; String mySecondVar = “I love CS”; myStringVar = mySecondVar; System.out.println(myStringVar);
Answers
Answered by
2
The output is : I love CS
the value of myStringVar is replaced
the value of myStringVar is replaced
Answered by
0
The output will be.
Good Morning.
I love CA.
reason.
because my string value and 2nd string value will be different.
so both will be output.
Good Morning.
I love CA.
reason.
because my string value and 2nd string value will be different.
so both will be output.
Similar questions