Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Console cons = System.console();
- if (cons == null) {
- System.err.println("No console.");
- System.exit(1);
- }
- String username = cons.readLine("Enter username: ");
- char[] passwd = cons.readPassword("Enter Password: ");
- String password = new String(passwd);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement