Skip to content

Commit b72887a

Browse files
committed
add Cli.java
1 parent 4d13897 commit b72887a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package hexlet.code;
2+
import java.util.Scanner;
3+
4+
public class Cli {
5+
public static void startGame() {
6+
Scanner sc = new Scanner(System.in);
7+
System.out.print("May I have your name? ");
8+
System.out.println("Hello, " + sc.nextLine() + "!");
9+
}
10+
}

0 commit comments

Comments
 (0)