Click here to Skip to main content
16,022,296 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
If I want to make a login page for my software then I must initialize password variable with a datatype.

But password can have multiple characters like numbers, alphabets, special symbols etc.

which datatype in java can be used for such case.

it would be nice to explain it with small example..

Thanks
Posted

1 solution

Would a String not suffice if you want a datatype that can contain digits, characters and symbols?
 
Share this answer
 
Comments
TorstenH. 21-Dec-11 7:37am    
String is perfect -> +5!
You can also use a int for a 4-6digit number. But then you'd have to check if it's a number.
CurrentlyBE 21-Dec-11 9:13am    
The password can be anything like we all have for gmail sequence all characters.
CurrentlyBE 21-Dec-11 9:14am    
oh yeah thanks and sorry string just never came to my mind....
merridus 21-Dec-11 9:15am    
No problem.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900