public class B1 {
int anInt;
String xx;
public B1(){
}
public B1(String xx,int anInt){
this.anInt = anInt;
this.xx = xx;
}
public void say(){
System.out.println("编号为"+anInt);
System.out.println("姓名为"+xx);
}
}
public class B01 {
public static void main(String[] args) {
B1 b1 =new B1();
b1.anInt=123;
b1.xx="路飞";
b1.say();
B1 b2 = new B1("niuniu",12);
b2.say();
}
}