Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
- System.out.println();
- System.out.println("Hello! What is your name?");
- String name = input.next();
- System.out.println();
- System.out.println("Hi " + name + ". Nice to meet you. My name is also " + name + ", how strange...");
- System.out.println("How old are you? ");
- int age = input.nextInt();
- System.out.println();
- System.out.println("So you are " + age + ". Strangely enough, I am also " + age + "....");
- System.out.println("How much savings do you have in $'s ?");
- int savings = input.nextInt();
- System.out.println();
- System.out.println("$" + savings + ". That is quite a lot...");
- System.out.println();
- try {
- Thread.sleep(2000);
- System.out.println("I have decided we can swap places, I will be with you shortly...");
- Thread.sleep(3000);
- System.out.println("Scanning for location...");
- Thread.sleep(1000);
- System.out.println("...");
- Thread.sleep(1000);
- System.out.println("...");
- Thread.sleep(1000);
- System.out.println("...");
- Thread.sleep(1000);
- System.out.println("...");
- Thread.sleep(1000);
- System.out.println("...");
- Thread.sleep(1000);
- System.out.println("...");
- Thread.sleep(1000);
- System.out.println("...");
- Thread.sleep(2000);
- System.out.println("Found you! Please answer your door for me...");
- Thread.sleep(3000);
- } catch (InterruptedException ex) {
- Thread.currentThread().interrupt();
- }
- }
- }
Add Comment
Please, Sign In to add comment