public class student {
private String stuName;
private int stuAge;
private int stuNumber;
public student(String name,int age,int number)
{
stuName=name;
stuAge=age;
stuAge=number;
}
public String getName()
{
return stuName;
}
public int getAge()
{
return stuAge;
}
public int getNumber()
{
return stuNumber;
}
public static void main(String[] args) {
student stu1=new student("张三",10,14) ;
System.out.println("学生姓名:"+stu1.getName());
System.out.println("学生年龄:"+stu1.getAge());
System.out.println("学生学号:"+stu1.getNumber());
}
}
摩诃迦叶
相关分类