CJCoding With Joseph
15free / daySign inCreate account
Back to Code Walkthrough

String Method Return Value Not Stored

Java code walkthrough · Question 28
mediumStrings

Code

Read carefully. What does this print?
1public class Main {
2 public static void main(String[] args) {
3 String s = "hello";
4 s.toUpperCase();
5 s = s + "!";
6 System.out.println(s);
7 }
8}

Your answer