Main.java 641B

123456789101112131415161718192021222324252627
  1. /**
  2. * Created by iyasuwatts on 10/17/17.
  3. */
  4. import java.util.Scanner;
  5. public class Main {
  6. public static void main(String[] args ){
  7. Scanner input = new Scanner(System.in);
  8. System.out.println("Enter your name.");
  9. String name = input.next();
  10. //String name2 = input.next();
  11. if(name.equals("Alice")){
  12. System.out.println("Hi Alice!");
  13. } else if(name.equals("Bob")){
  14. System.out.println("Hi Bob!");
  15. } else {
  16. System.out.println(name + ", I don't know you!");
  17. }
  18. //System.out.println("Number 2's name is " + name2);
  19. }
  20. }