0

I know that strings are immutable, but how this work

    String s1 = "Java";
    System.out.println(s1.toUpperCase()); //will show in capital

    String s2="Stack overflow";
    s2.toUpperCase();
    System.out.println(s2); //won't show in capital
hewa jalal
  • 952
  • 11
  • 24

0 Answers0