Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. Scanner in = new Scanner(System.in);
  2.  
  3. System.out.println("Where do you live??");
  4. String country = in.nextLine();
  5.  
  6. //get first input
  7.  
  8.  
  9. System.out.print("Type your first name ");
  10. String name = in.nextLine();
  11.  
  12. //get second input
  13. System.out.print("Type your age");
  14. int age = in.nextInt();
  15.  
  16. //get Third input
  17.  
  18.  
  19. //Concat all the strings and Display it on the console log
  20. System.out.println("Hello, " + name + ". Next year you'll be " + (age+1) + "in this Country" + country);
  21.  
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement