public final void clearPassword(){
  Arrays.fill(password,'?');
  password=null;
}

public final void clearPassword ( ) { Arrays . fill ( password , '?' ) ; password = null ; }
clears the password by overwriting it .
