java - Strange type of password in mysql workbench -


i have problem password when password inputed in jpasswordfield.

kasirlozinka = new jpasswordfield("lozinka"); final string lozinka = new string(kasirlozinka.getpassword().tostring()); 

and when write password "lozinka" in mysql workbench "[c@3f528528", questions are, how fix , user input in string, , type of password this, how decrypt it?

the call jpasswordfield.getpassword() returns char[] (and don't want call tostring() on that, because array doesn't override object.tostring). can use string.valueof(char[]) make string. like,

char[] pass = kasirlozinka.getpassword(); string pw = string.valueof(pass); 

Comments

Popular posts from this blog

java - OnDragListener Fires Several Times? -

spring - "Dispatcher has no subscribers" during startup -