importjava.util.Scanner;publicclassconte{protectedstaticStringwan;publicstaticvoidmain(String[]args){Scannersc=newScanner(System.in);System.out.println("1.注册\t2.登录\t3...
import java.util.Scanner;
public class conte {
protected static String wan;
public static void main(String[]args){
Scanner sc=new Scanner(System.in);
System.out.println("1.注册\t2.登录\t3.查看所有用户\t4.退出");
while(true){
if(Integer.parseInt(wan)==1){
System.out.println("请输入用户名:");
String account=sc.next();
System.out.println("请输入密码:");
String password1=sc.next();
System.out.println("确认密码:");
String password2=sc.next();
if(password1.equals(password2)){
System.out.println("注册成功");
}else if(true){
System.out.println("错误!!!与上面的不对应");}
}else if(Integer.parseInt(wan)==2){
System.out.println("请输入用户名:");
wan=sc.next();
System.out.println("请输入密码:");
wan=sc.next();
}
}
}
}
展开