Reading passwords with System.console()
This question reminds me of the discussion in this popular answer from Why is char[] preferred over String for passwords? As noted in comments, it's possible that arrays being moved by the garbage collector will leave...