日期:2014-05-20 浏览次数:20957 次
public class Person {
private int studentno;
private int teacherno;
private String studentname;
private String teachername;
private int mark;
public Person(int studentno, String studentname, int mark) {
this.studentno = studentno;
this.studentname = studentname;
this.mark = mark;
System.out.println(studentno + studentname + mark);
}
public Person(int teacherno, String teachername) {
this.teacherno = teacherno;
this.teachername = teachername;
System.out.println(teacherno + teachername);
}
public static void main(String[] args) {
//int x,z;
//char y[]=new char[20];
//System.out.println("input");
Person r = new Person(1, "", 1);
Person r1 = new Person(2, "");
}
}