โ Back to Printing
Question 280
Greet the User
Greet the User
Read one line of input (a name) with aScanner, then print a greeting. If the input isAlice, print exactly: Hello, Alice! UseScanner.nextLine()and concatenate the name into the greeting.
Expected Output:
Hello, Alice!
Topics:
Printing
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (sysout, psvm, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.