Guest User

Untitled

a guest
Oct 16th, 2018
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. /*
  2. * Zachary Monast
  3. * CSC - 111
  4. * October 16, 2018
  5. * zacmonast@gmail.com
  6. */
  7.  
  8. import java.util.Scanner;
  9.  
  10. public class Password_Username {
  11.  
  12. public static void main(String[] args) {
  13. Scanner input= new Scanner(System.in);
  14. System.out.print("Enter user name: ");
  15. String user = input.nextLine();
  16. System.out.print("~~~~~~~~~~~~~~~~~~~~~~~~\n");
  17.  
  18. System.out.print("Enter password:");
  19. String pass = input.nextLine();
  20. System.out.print("~~~~~~~~~~~~~~~~~~~~~~~~\n");
  21.  
  22. if (user.equalsIgnoreCase("CSC-111") && pass.equals("JavaIsGood")) {
  23. System.out.print("Acess Granted.");
  24. System.out.print("\n~~~~~~~~~~~~~~");
  25. }
  26. else {
  27. System.out.print("Acess Denied.");
  28. System.out.print("\n~~~~~~~~~~~~~");
  29. }
  30. }
  31.  
  32. }
Add Comment
Please, Sign In to add comment