Inner classes capture type variables from an outer class, so you get an error.
If you want to instantiate raw AVLNode[] , you can qualify the class name as raw MyAVLTree :
// vvvvvvvvv AVLNode[] bArray = new MyAVLTree.AVLNode[size];
You will get warnings, because usually you create a type of raw array; however this compiles. Be careful with the ordinary things that appear along with raw types if you don't know them, although of course you cannot create an array in Java that is not raw.
source share