编写一个JAVA代码。条件如下

2024-07-16 21:11:09作者:饭克斯

Stringusername=username;Stringpassword=password;booleanisLawfulName=username.length()>=6&&Pattern.compile(^[A-Za-z0-9]+$).matcher(username).matches();booleanisLawfulPwd=password.length()>=8&&Pattern.compile(^[_&]$).matcher(password).matches();if(isLawfulName&&isLawfulPwd){System.out.println(可以注册);}else{System.out.println(不能注册);}主要代码。具体可以根据你自己的需求来改。

展开全文

热门推荐

相关攻略

猜你喜欢