What is the output of the following Java program?
public class Main {
public static void main(String[] args) {
String s = " hello ";
s.trim();
s.toUpperCase();
s.concat("!");
System.out.println("[" + s + "]");
s = s.trim().toUpperCase().concat("!");
System.out.println("[" + s + "]");
}
}
String methods return new Strings; unless the result is assigned, the original stays unchanged.