class Main {
public static void main(String[] args) {
String s = "hello";
// this result is discarded; s does not change
s.toUpperCase();
System.out.println(s);
// you must assign the new string
String up = s.toUpperCase();
System.out.println(up);
}
}capture the returned value