Advertisement
AngelKejov

Untitled

Mar 13th, 2021
84
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.company;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class PasswordGuess {
  6.  
  7.     public static void main(String[] args) {
  8.         Scanner sc = new Scanner(System.in);
  9.  
  10.         String password = "s3cr3t!P@ssw0rd";
  11.         String input = sc.nextLine();
  12.  
  13.         if (password.equals(input)) {
  14.             System.out.println("Welcome");
  15.         } else {
  16.             System.out.println("Wrong password!");
  17.         }
  18.     }
  19. }
  20.  
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement