Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Zachary Monast
- * CSC - 111
- * October 16, 2018
- * zacmonast@gmail.com
- */
- import java.util.Scanner;
- public class Password_Username {
- public static void main(String[] args) {
- Scanner input= new Scanner(System.in);
- System.out.print("Enter user name: ");
- String user = input.nextLine();
- System.out.print("~~~~~~~~~~~~~~~~~~~~~~~~\n");
- System.out.print("Enter password:");
- String pass = input.nextLine();
- System.out.print("~~~~~~~~~~~~~~~~~~~~~~~~\n");
- if (user.equalsIgnoreCase("CSC-111") && pass.equals("JavaIsGood")) {
- System.out.print("Acess Granted.");
- System.out.print("\n~~~~~~~~~~~~~~");
- }
- else {
- System.out.print("Acess Denied.");
- System.out.print("\n~~~~~~~~~~~~~");
- }
- }
- }
Add Comment
Please, Sign In to add comment