Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- System.out.println("Type your username: ");
- String username1 = reader.nextLine();
- System.out.println("Type your password: ");
- String password1 = reader.nextLine();
- if (username1.equals("alex")) {
- if (password1.equals("mightyducks")) {
- System.out.println("You are now logged into the system!");
- }
- }
- if (!(username1.equals("alex"))) {
- if(password1.equals("mightyducks")) {
- System.out.println("Your username or password was invalid!");
- }
- }
- if (username1.equals("alex")) {
- if(!(password1.equals("mightyducks"))) {
- System.out.println("Your username or password was invalid!");
- }
- }
- if (username1.equals("emily")) {
- if(password1.equals("cat")) {
- System.out.println("You are now logged into the system!");
- }
- }
- if (!(username1.equals("emily"))) {
- if (password1.equals("cat")) {
- System.out.println("Your username or password was invalid!");
- }
- }
- if (username1.equals("emily")) {
- if (!(password1.equals("cat"))) {
- System.out.println("Your username or password was invalid!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement