This is asked in one of my interviews:
In Java what object or container is used to store sensitive information?
When I searched I got this link Why is char[] preferred over String for passwords?
So is character array is the right answer to this question?