Is not an enclosing class Java

后端 未结 11 2530
轻奢々
轻奢々 2020-11-28 01:41

I\'m trying to make a Tetris game and I\'m getting the compiler error

Shape is not an enclosing class

when I try t

11条回答
  •  迷失自我
    2020-11-28 02:02

    In case if Parent class is singleton use following way:

    Parent.Child childObject = (Parent.getInstance()).new Child();
    

    where getInstance() will return parent class singleton object.

提交回复
热议问题