Code example for Console

Methods: readPassword

0
	public String readPassword() throws IOException {
		String password = null;
		Console cons;
		char[] passwd;
		if ((cons = System.console()) != null
				&& (passwd = cons.readPassword("[%s]", "password:")) != null) {
			password = new String(passwd);
		} 
		return password;
	} 
 
	@Override 
	public void setRoot(File projectPath) {
		root = projectPath;
	} 
 
	@Override 
	public File getRoot() {
		return root;
	} 
Contextual code suggestions in your IDE  Get Codota for Java