We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 073a45e commit 5285238Copy full SHA for 5285238
app/src/main/java/hexlet/code/Cli.java
@@ -0,0 +1,13 @@
1
+package hexlet.code;
2
+
3
+import java.util.Scanner;
4
5
+public class Cli {
6
+ public static void greeting() {
7
+ Scanner scanner = new Scanner(System.in);
8
+ System.out.print("May I have your name? ");
9
+ String userName = scanner.next();
10
+ System.out.println("Hello, " + userName + "!");
11
+ scanner.close();
12
+ }
13
+}
0 commit comments