We store the password as char array in java and find the good reason for this. I came across an interview question stating "What if password is encrypted and we save that in String, is that okay? or why not?"
What I could think is process of encryption and decryption involve Plain text String object somewhere and we are back to same issue plain text password in String. Not very convinced with my own answer, What may be reason/justification for this.