Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class AllAboutMe {
- public static void main (String[] args) {
- Scanner s = new Scanner(System.in);
- System.out.print("What is your name?");
- String myName=s.nextLine();
- System.out.print("What school do you attend?");
- String mySchool=s.nextLine();
- System.out.print("How old are you?");
- int myAge=s.nextInt();
- System.out.println("My name is "+myName+", I attend "+mySchool+" and I am "+myAge+" years old.");
- s.close();
- }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement