MyClass.java
 

public class MyClass {
  public static void main(String[] args) {
    String txt = "Hello World";
    System.out.println(txt.toUpperCase());
    System.out.println(txt.toLowerCase());
  }
}

Result:
HELLO WORLD
hello world