This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
hello...im building a SWING login interface with the JPasswordField Component. To obtain the unmasked password i use char password=txtPassword.getPassword();
the function getPassword returns an array of chars...but i need the result as simply of type String. i tried the type casting several times but im not having the hang of it...can anyone help me plz? thanks in advance, Drftwy
Considering object references, note that you cannot change the type of an object with a cast. A cast creates a reference of a different type than the reference being cast, but both references would point to the same, unchanged object.