Can you omit the parenthesis from attributes with no params?
Posted
by Joan Venge
on Stack Overflow
See other posts from Stack Overflow
or by Joan Venge
Published on 2010-03-15T15:20:30Z
Indexed on
2010/03/15
15:29 UTC
Read the original article
Hit count: 152
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.
© Stack Overflow or respective owner