大家帮忙看看从键盘输入那该怎么改
package lang.lang1;import *;
import
class person{
private int No;
String Name,password;
private float yue;
void initperson(String newName,String newpassword,int newNo,float newyue){
Name = newName;
password = newpassword;
yue = newyue;
No = newNo;
}
void printperson(){
System.out.println("户名:"+Name);
System.out.println("账号:"+No);
System.out.println("余额:"+yue);
}
void examinperson() throws IOException {
System.out.println("请输入密码");
BufferedReader str = new BufferedReader(new InputStreamReader(System.in));
String a = str.readLine();
System.out.println(a);
if(a==password){
printperson();
}
else{
System.out.println("密码错误");
}
}
}
public class Bank {
public static void main(String[] args) throws IOException {
person wo = new person();
wo.initperson("张三", "abc", 123456, 5000);
wo.examinperson();
}
}
就是简单的输入密码显示信息,输入部分搞不明白