hi all,
If I'm using more than one modifier at a time on a single statement of a Java code, can I place them in any order?
I mean following two line are ok..
Thanks.Code:static final double weeks = 9.5;
final static double weeks = 9.5;
Printable View
hi all,
If I'm using more than one modifier at a time on a single statement of a Java code, can I place them in any order?
I mean following two line are ok..
Thanks.Code:static final double weeks = 9.5;
final static double weeks = 9.5;
Pretty much, yes. By convention, at least, the access specifier is always first, but the order of final, static and synchronized are, in my experience, a matter of style.
I assume that there is no specific style in the industry, am I correct. It's depend on the person/programmer.