Advertisement
dronkowitz

Java Test.app

Jun 19th, 2022 (edited)
1,047
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2.  
  3. public class App {
  4.     static int HP = 100;
  5.     static float speed = 3.5f;
  6.     static boolean isalive = true;
  7.     static String name = "";
  8.     static String food = "";
  9.     static String workplace = "";
  10.     static String sport = "";
  11.     static String music = "";
  12.  
  13.     public static void main(String[] args) {
  14.         Scanner input = new Scanner(System.in);
  15.  
  16.         System.out.println("Hello, World!");
  17.         System.out.println("What is your name?");
  18.         name = input.nextLine();
  19.         System.out.println("Its nice to meet you " + name);
  20.         System.out.println("Your speed is " + speed);
  21.         System.out.println("What is your favourite food?");
  22.         food = input.nextLine();
  23.         System.out.println("Where do you work at?");
  24.         workplace = input.nextLine();
  25.         System.out.println("what is your favorite sport");
  26.         sport = input.nextLine();
  27.         System.out.println("what is your favorite kind of music");
  28.         music = input.nextLine();
  29.  
  30.         System.out.println("Your name is " + name + ". Your favourite food is " + food + ". you work at " + workplace
  31.                 + ". Your favourite spot is " + sport + ". " + music + ". what is your favourite kind of music");
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement