资讯

As outlined in Item #2 of the Second Edition of Effective Java, there are several disadvantages to using constructors with large parameter lists. To help illustrate, I include a code listing below.
The Java language spec lists 10 Java constructor types, including default, no-args, canonical, private parameterized, generic, overloaded and anonymous.
In the post NetBeans 7.2: Refactoring Parameterized Constructor As Builder , I looked at how NetBeans 7.2 supports refactoring a constructor to a builder as described in Item 2 of the Second ...