123456789101112131415161718192021222324252627282930313233
  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. {
  8. }
  9. public void greetings(){
  10. Scanner input = new Scanner(System.in);
  11. System.out.println("please enter you name: ");
  12. String name = input.next();
  13. if (name.equals( "Alice"))
  14. {
  15. System.out.println("Hello " + name );
  16. }
  17. else if (name.equals("Bob"))
  18. {
  19. System.out.println("Hello "+ name);
  20. }
  21. else
  22. {
  23. System.out.println("Sorry");
  24. }
  25. }
  26. }