package yst;
public class x {
public String name;
public int age;
public int number;
public int address;
public x() {
}
public x(String name, int age, int number, int address) {
this.name = name;
this.age = age;
this.number = number;
this.address = address;
}
public String getName() {
return name;
}
public int getAge() {
return age;
}
public int getNumber() {
return number;
}
public int getAddress() {
return address;
}
public void setName(String name) {
this.name = name;
}
public void setAge(int age) {
this.age = age;
}
public void setNumber(int number) {
this.number = number;
}
public void setAddress(int address) {
this.address = address;
}
}
public void xuexi(String name){
System.out.println(name +"在学习......");
}
public void call(String name){
System.out.println(name +"在打电话......");
}
public void da(String name){
System.out.println(name +"在" + "dizhi"+ "打游戏......");
}
public static void main(String[] args) {
x student = new x("jack", 12, 181, "DongGuan");
student.da("xuexi");
student.call("yst");
student.xuexi("dizhi");
System.out.println(student.age);
System.out.println(student.name);
}
}
【无标题】
于 2024-04-29 15:20:51 首次发布