1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- /**
- * Created by iyasuwatts on 10/17/17.
- */
- import java.util.Scanner; //get access to the library
-
- public class Main {
-
- public static void main(String[] args ){
- // SAVES INPUT
- String name1;
- String name2;
-
- //get input
- Scanner input = new Scanner(System.in);
-
-
- System.out.println("Enter your name: ");
- name1 = input.nextLine(); //assign first input
-
- System.out.println("Enter other name: ");
- name2 = input.nextLine();// assign second input
-
- //make the names lowerCase
- name1.toLowerCase();
- name2.toLowerCase();
-
- String nameSaver1 = name1;
- String nameSaver2 = name2;
-
- if((name1.equals(nameSaver1)||name1.equals(nameSaver2))&&((name2.equals(nameSaver1))||(name2.equals(nameSaver2))))
- {
- System.out.println("Hello!" + name1 +" "+ name2);
- }
- else
- {
- System.out.println("I do not know you guys!");
- System.out.println("false ");
- }
-
-
- }
-
- }
|