0
Char over string
Why Char array is preferred over String for storing password?
1 ответ
+ 2
Since Strings are immutable there is no way contents of Strings can be changed because any change will produce new String, while if you char[] you can still set all his element as blank or zero. So Storing password in character array clearly mitigates security risk of stealing password. ... char[] is less vulnerable.