Skip to content
Open

Done #36

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.
25 changes: 25 additions & 0 deletions src/main/java/Main.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,34 @@
import java.util.Scanner;
/**
* Created by iyasuwatts on 10/17/17.
*/

//redone with instructor help
public class Main {

public static void main(String[] args ){
Scanner in = new Scanner(System.in);
String name = in.nextLine();
// String user1 = "Alice";
// String user2 = "Bob";
/* if (name.equals("Alice") || name.equals("Bob")){
System.out.println("Hey!!");
} else {
System.out.println("Try Again!");
}*/

testingNames( "Alice", name);
testingNames( "Bob", name);
}


//testingNames is your method
public static void testingNames(String username, String enteredname){
//this is basically saying if the entered name by the user is equal to the username: "Alice" or "Bob" then print
if (enteredname.equals(username)){
System.out.println("Hey!!!");
}


}
}