java够着函数的定义问题!
程序代码:
package ch4; import java.sql.Date; class Person{ int pid; Date birthday; String address; String name; boolean sex; Person(){ pid=-1; name=null; sex=false; address=null; } Person(int pid,String name,boolean sex,Date birthday,String address){ this.pid=pid; this.name=name; this.sex=sex; this.address=address; } public void setPoint(int x,boolean y){ pid=x; sex=y; System.out.println(pid); if (sex) System.out.println("男"); else System.out.println("女"); } } class Student extends Person{ int sno; String school; Student(){ super(); sno=-1; school=null; } Student(int pid,String name,boolean sex,Date birthday,String address,int sno,String school){ super(pid,name,sex,birthday,address); this.sno=sno; this.school=school; } void printData(){ System.out.println("姓名:"+name); System.out.println("学校:"+school); System.out.println("学号:"+sno); } } public class Ex4_7 { public static void main(String[] args) { // TODO Auto-generated method stub Person p=new Person(); p.setPoint(100,true); Student t=new Student(11111,"陆嘉文",true,19900125,"金溪县",31,"电力职院"); t.printData(); } } 这是JAVA的代码,请问我错在哪里啊!eclipse它是说我的Student够着函数没有定义,请问是怎么回事呢?