Dear All,
It would be great if someone could help me with this..
I have one base class and other two extended classes.
but when I try to compile the Noble.java it works fine without any compilation error
when I try to compile PersonWithStrength.java it says cannot find symbol Noble
when I try to compile Lord.java it gives me the same error cannot find symbol Noble
javac Lord.java
Lord.java:3: cannot find symbol
symbol: class Noble
class Lord extends Noble {
All classes are made as different files in the same directory
###############Noble,java #################3
class Noble {
private final String name;
private double totalStrength;
public Noble(String p_name){
this.name = p_name;
}
public Noble(String p_name, double p_strength) {
this.name = p_name;
this.totalStrength = p_strength;
}
}
###############Lord.java#####################
package war;
class Lord extends Noble {
public Lord(String p_name){
super(p_name);
}
}
###############PersonWithStrength.java############ #######
package war;
class PersonWithStrength extends Noble{
public PersonWithStrength(String p_name, double p_strength) {
super(p_name,p_strength);
}
}
Please help me with this... any help would be appreciated!!