Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- /*
- * Created by todor on 18.01.2017 г..
- */
- public class u09_PasswordGuess {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- String myPassword = "s3cr3t!P@ssw0rd";
- String userPassword = scan.nextLine();
- if (myPassword.equals(userPassword)){
- System.out.println("Welcome");
- }
- else {
- System.out.println("Wrong password!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement