SHARE
TWEET

Untitled

a guest Jun 8th, 2017 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static void main(String[] args) {
  2.         Scanner reader = new Scanner(System.in);
  3.  
  4.         System.out.println("Type your username: ");
  5.             String username = reader.nextLine();
  6.  
  7.         System.out.println("Type your password: ");
  8.             String password = reader.nextLine();
  9.  
  10.  
  11.         if(username.equals("alex") || username.equals("emily") && password.equals("mightyducks") || password.equals("cat")) {
  12.             System.out.println("You are now logged into the system!");
  13.         }
  14.         else{
  15.             System.out.println("Your username or password vas invalid!");
  16.         }
  17.     }
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top