java实现改修改密码

/修改密码

public double xiugai(long zh4,String mima4) {

for (int i = 0; i < accountList.length; i++) {

Account account = accountList[i];

if(zh4==account.getId()){

if(mima4.equals(account.getPassword())){

System.out.println("登录成功!!!");

System.out.println("请输入新的密码");

String newMima=sc.next();

if(mima4.replace(mima4, newMima) != null){

System.out.println("请再次确认密码");

String newMima1=sc.next();

if(newMima1==newMima){

System.out.println("密码修改成功");

break;

}else{

System.out.println("密码有误");

}

}

}

}

}

return 0;

}


釋汐
浏览 3510回答 1
1回答

maybe丶xg

你们是在做笔记嘛?
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java