Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Kayttajatunnukset {
- public static void main(String[] args) {
- Scanner reader = new Scanner(System.in);
- System.out.println("Type your username: ");
- String userName = reader.nextLine();
- // System.out.println(userName);
- System.out.println("Type your password: ");
- String password = reader.nextLine();
- // System.out.println(password);
- if ((userName.equals("alex") && password.equals("mightyducks")) || (userName.equals("emily") && password.equals("cat"))) {
- System.out.println("You are now logged into the system!");
- } else {
- System.out.println("Your username or password was invalid!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement