Putting Nested Classes In Separate Files

后端 未结 3 407
终归单人心
终归单人心 2021-01-03 00:03

I have a file with nested classes, but it\'s becoming long enough to be unreadable. Is there a way I can break out the nested classes into separate files?

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-03 00:55

    I'm afraid not.
    As an alternative, you could consider converting some of them to plain Java classes: although nested classes increase encapsulation, you can certainly create good OO design without them.

    My two cents.

提交回复
热议问题