CJCoding With Joseph
15per day
← Back to Question List
Java Code Walkthrough #28

String Method Return Value Not Stored

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