Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scanner in = new Scanner(System.in);
- System.out.println("Where do you live??");
- String country = in.nextLine();
- //get first input
- System.out.print("Type your first name ");
- String name = in.nextLine();
- //get second input
- System.out.print("Type your age");
- int age = in.nextInt();
- //get Third input
- //Concat all the strings and Display it on the console log
- System.out.println("Hello, " + name + ". Next year you'll be " + (age+1) + "in this Country" + country);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement