getPassword()?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: getPassword()?

Threaded View

  1. #1
    Join Date
    Jan 2005
    Posts
    61

    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 04: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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center