borkins

09a. Password Guess

Mar 23rd, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1. /*
  2.  * Simple Conditions
  3.  */
  4. import java.util.Scanner;
  5.  
  6. public class _09a_PasswordGuess
  7. {
  8.     public static void main(String[] args)
  9.     {
  10.         Scanner scan = new Scanner(System.in);
  11.  
  12.         if (scan.nextLine().equals("s3cr3t!P@ssw0rd")) {
  13.             System.out.println("Welcome");
  14.         } else {
  15.             System.out.println("Wrong password!");
  16.         }
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment