package com.hanqi;
public class Student {
String Name;
int XueHao,Age;
Student(String Name,int XueHao,int Age)
{
this.Name=Name;
this.XueHao=XueHao;
this.Age=Age;
}
void outPut()
{
System.out.println("姓名:"+this.Name+" 学号:"+this.XueHao+" 年龄:"+this.Age);
}
public static void main(String[] args) {
// TODO 自动生成的方法存根
Student Student1=new Student("张三",20130182,21);
Student1.outPut();
Student Student2=new Student("李四",20130283,20);
Student2.outPut();
Student Student3=new Student("王五",20130384,21);
Student3.outPut();
}
}
![](https://images2015.cnblogs.com/blog/917895/201605/917895-20160517220453685-1178414375.png)