When we design the registration module, we often have to verify that two times the password is consistent, then how to use JPasswordField implementation?First, the GUI interface is designed:Implementation 1: Use the GetText () method to obtain JPasswordField content, but this method has been deprecated. Also, simply put, the difference between equals () and "= =" Compares an object: "Equals ()" Compares the object's "content" only, and "= =" compares
To convert a string into a character arrayFirst letter judgmentIdea: How to get the first letterARR[0] The first element of the array is the first letterA number evaluates to True to a number false to a non-numeric"0123456789". Contains (arr[0]+ "");The alphabet determines that one of them is a letter.(arr[0]>= ' z ' arr[0]Other index positions can be judged simply by traversing the arrayNote: When writing this code, it should be a judgment to write the verification, after all the interpretation
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.