Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 470 Bytes

File metadata and controls

15 lines (11 loc) · 470 Bytes

UPPERCASE

Similarly, if you have a String which potentially contains lower-cased letters, you can get a new String with everything transformed into upper-case using the .toUpperCase() method.

void main() {
    String message = "Happy Valentines Day";

    String upperCased = message.toUpperCase();
    System.out.println(upperCased);
}

This does not change the original String in place. It just makes a new String with all upper-case letters.