Main.java 586B

12345678910111213141516171819202122232425262728
  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 Name:" );
  9. String name = input.nextLine();
  10. if(name.equals ("Alice")){
  11. System.out.println ("Hi Alice");
  12. }
  13. else if (name.equals ("Bob")){
  14. System.out.println ("Hi Bob");
  15. }
  16. else {
  17. System.out.println ("Go Away!");
  18. }
  19. }
  20. }