|
|
|
|
|
by electrum
3536 days ago
|
|
Those Javadoc comments are useless. If you have useful comments, they would take up the same space even if the language supported properties. Now you're left with something that could be fit on three lines (the "final" for the parameter is also useless and can be removed): public Foo getFoo() { return foo; }
public void setFoo(Foo foo) { this.foo = foo; }
Even if you don't write the actual source like that, a good editor like IntelliJ can automatically display them like that (code folding).The C# version is about the same length: public Foo Foo {
get { return foo; }
set { foo = value; }
}
Also, you don't have to write the get/set methods yourself. You hit a few keys and your editor generates them. |
|