Advertisement
Guest User

Untitled

a guest
Aug 27th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class NameAge
  3. {
  4. public static void main(String[] args)
  5. {
  6. Scanner kboard = new Scanner(System.in);
  7. System.out.print ("Hi there. What is your name?");
  8. String firstName = kboard.nextLine();
  9. System.out.print ("Hi " + firstName + ". How old are you?");
  10.  
  11. Scanner keyboard = new Scanner(System.in);
  12. int x = keyboard.nextInt ();
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement