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 b547d70 commit 7d433ccCopy full SHA for 7d433cc
Part3/InputTest.java
@@ -0,0 +1,14 @@
1
+import java.util.*;
2
+
3
+public class InputTest {
4
+ public static void main(String[] args) {
5
+ Scanner in = new Scanner(System.in);
6
+ String name = in.nextLine();
7
8
+ System.out.print("How old are you?");
9
+ int age = in.nextInt();
10
11
+ System.out.println("Hello, " + name + ". Next year, you'll be " + (age + 1));
12
+ }
13
+}
14
0 commit comments