我发现,当我有序列化
而不是序列化()
中,code仍然编译。
I noticed when I have Serializable
instead of Serializable()
, the code still compiles.
有没有规则这一点,你可以省略括号?它是一个好的做法呢?这似乎更易读我,除非我失去了一些东西。
Is there a rule for this that you can omit the parenthesis? Is it a good practice? It seems more readable to me unless I am missing something.
有关于我已经在subect看到anywehere最佳做法,没有特定的规则。
There's no particular rule regarding best practices that I've seen anywehere on the subect.
通常情况下,我发现人们谁手型的属性省略空括号,但code一代几乎总是明确地包括它们。
Generally, I find that people who hand-type their attributes omit the empty parens, but code generation almost always explicitly includes them.