Why is getText() in JPasswordField deprecated?
In accordance with this answer on the above question, I realized that creating a String object containing a password is a security risk , as it can remain in memory for a while , and this is unchanged.
So I was wondering
EDIT
When the question is suspended, please be kind enough to share your knowledge by adding a comment, and think about reopening the question if you think that it can receive interesting answers in the future. :)
java garbage-collection string security memory
Roshana pitigala
source share