Advertisement
Guest User

Untitled

a guest
Jul 17th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. Console cons = System.console();
  2. if (cons == null) {
  3. System.err.println("No console.");
  4. System.exit(1);
  5. }
  6. String username = cons.readLine("Enter username: ");
  7. char[] passwd = cons.readPassword("Enter Password: ");
  8. String password = new String(passwd);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement