Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class NameAge
- {
- public static void main(String[] args)
- {
- Scanner kboard = new Scanner(System.in);
- System.out.print ("Hi there. What is your name?");
- String firstName = kboard.nextLine();
- System.out.print ("Hi " + firstName + ". How old are you?");
- Scanner keyboard = new Scanner(System.in);
- int x = keyboard.nextInt ();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement