I get an error in my code that can't find the symbol and I've searched everywhere but still can't find the solution. this file is separate
class P1 {
protected void aFancyMethod() {
System.out.println("what a fancy method");
}
}
public class P2 extends P1 {
public static void main(String argv[]) {
P2 p2 = new P2();
p2.aFancyMethod();
}
}
my error same...
P2.java:3: error: cannot find symbol
public class P2 extends P1 {
^
symbol: class P1
P2.java:7: error: cannot find symbol
p2.aFancyMethod();
^
symbol: method aFancyMethod()
location: variable p2 of type P2
2 errors