From fb7d73258eacd87f1358e3d75ad0ccc33f94d1c6 Mon Sep 17 00:00:00 2001 From: Salvatore Date: Wed, 27 Dec 2023 16:30:00 +0100 Subject: [PATCH] added use of method nextLine() of Scanner class; added use of method toUpperCase() of String class; --- 11 - Getting User Input/src/App.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/11 - Getting User Input/src/App.java b/11 - Getting User Input/src/App.java index 08ed717..692d2ac 100644 --- a/11 - Getting User Input/src/App.java +++ b/11 - Getting User Input/src/App.java @@ -14,5 +14,12 @@ public static void main(String[] args) { // Tell them what they entered. System.out.println("You entered: " + value); + + + // Read an entire line (as a String) from the system input (keyboard) + String entireLine = input.nextLine(); + + // Prints the read line to the system output after having transformed it to uppercase + System.out.println(entireLine.toUpperCase()); } } \ No newline at end of file