javaSE_day05
模拟注册功能
1.使用数组存储个人信息
public class Demo {
static String[] arrayId = {
};
static String[] arrayName = {
};
static String[] arrayPwd = {
};
static String[] arrayEmail = {
};
static int loginIndex = -1;
2. 用户注册 register()
public static void register(String id,String name,String pwd,String email) {
arrayId = Arrays.copyOf(arrayId,arrayId.length+1);
arrayName = Arrays.copyOf(arrayName, arrayName.length+1);
arrayPwd = Arrays.copyOf(arrayPwd, arrayPwd.length+1);
arrayEmail = Arrays.copyOf(arrayEmail, arrayEmail.length+1);
arrayId[arrayId.length -1] = id;
arrayName[arrayName.length-1] = name;
arrayPwd[arrayPwd.length -1] = pwd;
arrayEmail[arrayEmail.length-1] = email;
}
public static void showInfo()