An enclosing instance that contains is required

前端 未结 3 1387
花落未央
花落未央 2020-11-30 04:47

An enclosing instance that contains is required

Below is the code. positionObj is the object that I am trying to use and i

3条回答
  •  青春惊慌失措
    2020-11-30 04:58

    First create an object of Outer class. In this case I think "Secretary". Then create positionObj. Like this,

    Secretary x = new Secretary();
    Secretary.positionObj y = x.new positionObj();
    

提交回复
热议问题