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 AliceAndBob/.DS_Store
Binary file not shown.
16 changes: 16 additions & 0 deletions AliceAndBob/Input.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
public class Input {



public static void main (String[] args) {
Scanner userInput = new Scanner(System.in);
System.out.println("Enter your name?");

String user = userInput.nextLine();
if(userinput.equals("Alice") || userinput.equals("Bob")) {
System.out.println("Hi " + user);
} else {
System.out.println(" ");
}
}
}
Binary file added src/.DS_Store
Binary file not shown.
Binary file added src/main/.DS_Store
Binary file not shown.
19 changes: 16 additions & 3 deletions src/main/java/Main.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
/**
* Created by iyasuwatts on 10/17/17.
*/

import java.util.Scanner;


public class Main {

public static void main(String[] args ){
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("Please enter your name");

String userInput = input.nextLine();

}
}
if(userInput.equalsIgnoreCase("Alice") || userInput.equalsIgnoreCase("Bob")) {
System.out.println("Hi " + userInput);
} else {
System.out.println("Wrong name");
}
}
}
Binary file added src/main/out/production/main/Main.class
Binary file not shown.