Why can't find the value in Java class?
Here is the problem, when I defined a interface like this:
package mypackage;
public interface Ainterface {
int VAL = 6;
}
and then I defined a class like:
public class Aclass implements Ainterface {
private String[] str = new String[VAL];
public static void main(String[] args) { ... }
}
When I compiler the program, there show the error message: can't find the
symbol "VAL".
symbol: VAL
position: Aclass
No comments:
Post a Comment