ComenzarEmpieza gratis

Upper or lower

As Strings are not primitives, they come in with some handy built-in functionality. It's now time for you to try out some of it!

Este ejercicio forma parte del curso

Introduction to Java

Ver curso

Instrucciones del ejercicio

  • Output the message String in uppercase letters using the .toUpperCase() method.
  • Output the message String in lowercase letters.

Ejercicio interactivo práctico

Prueba este ejercicio completando el código de muestra.

class ShoutItOut {
    public static void main(String[] args) {
        String message = "It's a good day to have a good day!";
        
        // Print the message in uppercase
        System.out.println(message.____);
        
        // Print the message in lowercase
        System.out.println(____);
    }
}
Editar y ejecutar código