I have a class like this:
public abstract class A {
public static final int FIELD;
}
and I want to initialize the FIELD variable in the child class. I mean something like this:
public class B extends A {
FIELD = 5;
}
EDIT
I actually have several classes that extend A, and they all have a FIELD variable, but with different values; so I found to reorganize the FIELD variable and declare it in a superclass. are there any other solutions? is it possible to have something like this? thanks for the help.
source
share