I am confused on the following:
I want to do:
public class MyGenericClass<SomeType> extends SomeMoreAbstractClass<SomeType>{
private Node<SomeType> beginNode;
private static final Node<SomeType> NOT_FOUND = null;
private static class Node<SomeType>{
//class definition here
}
}
I.e. I want to use the NOT_FOUND in the code in checks for null
I get the error Cannot make a static reference to the non-static type AnyType
in the line that I declare private static final Node<SomeType> NOT_FOUND = null;
How can I get arround this? I prefer to use it as a class variable and not an instance variable