|
-
getPassword()?
I'm having a bit of a problem trying to check if a given password is present in an array of password strings:
for(int a=0; a<passwords.length; a++)
if(passwords[a].equals(tfPassword.getPassword())) {
System.out.println("pass match ok");
}
The same code (using int i instead of int a) is working fine for checking the username, so I'm wondering if this is because the getPassword() method returns a char instead of a string. If that's the case, I've got a problem casting the char to a string, but this must be something that's done all the time, so any answers would be greatly appreciated 
<edit> Yup, must be what I thought, because it works if you take the echo character out and set the password field as a standard textfield. Still grateful for any solutions
Last edited by will808; 03-14-2005 at 03:06 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks