raliportokali

Untitled

May 16th, 2020
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Password {
  4. public static void main(String[] args) {
  5. Scanner scan = new Scanner(System.in);
  6. String userName = scan.nextLine();
  7. String passWord = scan.nextLine();
  8.  
  9. String enterPassword = scan.nextLine();
  10. while (!enterPassword.equals("password")){
  11. enterPassword= scan.nextLine();
  12.  
  13. }
  14. System.out.println("Welcome " + userName + "!");
  15. }
  16. }
Add Comment
Please, Sign In to add comment