Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Casting string to INT?

843836Feb 25 2005 — edited Feb 26 2005
Second IF statement trying to check if password is at least 6 characters and no more than 8 and casting string to int for check?


String msg = "";
int num = 6;

if(!pwd1.equals(pwd2)){
msg = msg + "<p>Passwords did not match: unable to set password.";
}
if(pwd == num){
msg = msg + "<p>Passwords did not match: unable to set password.";
}
if(userID.equals(userID)){
msg = msg + "<p>User ID already taken. Please choose a different User ID.";
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 26 2005
Added on Feb 25 2005
6 comments
347 views