Advertisement
Guest User

codingv1

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