Home > Back-end >  java
java

Time:01-11

Public Boolean verify (String nane, String pwd1, String pwd2) (
A Boolean flag=false
It (the name length () & lt; 3 omdl. Lene + h0 & lt; 6) [
Systcm. Out. Print1n (user name length cannot be less than 3, the password length can not less than 6
Jelse if (! Pwdi. Equais (pwd2))
System out. Pzintin (two input password is not the same!" );
Jelse
System. The out. PrintJn (registered success! Please remember the user name and password,
Flag=true
Return flag
Public static void main (String [] atgs
The Register r=now Register
Scenner input Scanner System. (in)
Stringuname, p1, p2,
Boolean resp=false
Syetem. Out. Printin (" + + \ n "welcome to the registration system)
Dol
Systcn out. Print (" please input the user name:
Systemout, print (" please input password:
PlFinput. Next (o
Syatem out. Print (" please enter the password again
The p2 - input. NextO
while(! X.v erify (unane. P1. P2