带包名 继承 error: cannot find symbol 我写了三个类: father.java
package m;
public class father{
public int x;
public int add(int a, int b){
int sum=a+b;
return sum;
}
}
son.java
package n;
import m.*;
public class son extends father{
}
fcb.java
import m.*;
import n.*;
public class fcb{
public static void main(String agrs[]){
son son1=new son();
son1.x=2;
System.out.println(son1.x);
System.out.println(son1.add(5,6));
}
}