Advertisement
john2054

AboutMe

Sep 21st, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class AboutMe {
  3.     public static void main (String[] args) {
  4.         Scanner s = new Scanner(System.in);
  5.         System.out.print("What is your name?");
  6.         String myName=s.nextLine();
  7.         System.out.print("What school do you attend?");
  8.         String mySchool=s.nextLine();
  9.         System.out.print("How old are you?");
  10.         int myAge=s.nextInt();
  11.         System.out.println("My name is "+ myName +", I attend "+ mySchool +" and I am "+ myAge +" years old.");
  12. s.close();
  13.         }
  14.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement