Advertisement
john2054

AllAboutMe

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