靜態方法使用動態內部類的錯誤

No enclosing instance of type ChatServer is accessible. Must qualify the allocation with an enclosing instance of type ChatServer (e.g. x.new A() where x is an instance of ChatServer).

這是靜態方法使用動態內部類的錯誤,要將調用內部類的語句寫到一個新的方法中,再new一個自己的類,再調用新方法。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章