Main.java 580B

123456789101112131415161718192021222324
  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 stdin = new Scanner(System.in);
  8. System.out.println("Please enter your username: ");
  9. String userName;
  10. userName = stdin.nextLine();
  11. String tempName = userName.toUpperCase();
  12. if(tempName.equals("ALICE") || tempName.equals("BOB")){
  13. System.out.println("Greetings " + userName);
  14. } else{
  15. System.out.println("Username is not Alice or Bob... no greeting for you");
  16. }
  17. }
  18. }