I'm maintaining a Java class that's 40K lines long.. problem?

后端 未结 12 1460
北海茫月
北海茫月 2021-02-04 01:02

This may be a subjective question leading to deletion but I would really like some feedback.

Recently, I moved to another very large enterprise project where I work as a

12条回答
  •  走了就别回头了
    2021-02-04 01:25

    Without looking at the code, it actually remains quite easy to make a determination. Never should a class be 40K lines, and never should a method be even 1K. Typically, if I can't print out a method on a piece of paper and see both the beginning and end brackets, I find a way to split it up.

    Might I ask, are they using OOP principles at all, or are they trying to use Java more as a functional or procedural language? I can't imagine a truly OOP project having a 40K line class.

提交回复
热议问题