Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
Binary file added src/.DS_Store
Binary file not shown.
Binary file added src/main/.DS_Store
Binary file not shown.
16 changes: 15 additions & 1 deletion src/main/java/Main.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
import java.util.Scanner;

/**
* Created by iyasuwatts on 10/17/17.
*/

public class Main {

public static void main(String[] args ){
public static void main(String[] args) {

Scanner name = new Scanner(System.in);
System.out.println("Enter your name");
String answer = name.next();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you'll need to change this to nextLine() to work correctly


if (answer.equalsIgnoreCase("Alice")) {
System.out.println("Hello and Greetings");
} else if (answer.equalsIgnoreCase("Bob")) {
System.out.println("Hello and Greetings");
} else {
System.out.println("Your not is not Alice or Bob");
}
}
}