posted 23 years ago
Hi,
This is what JLS says on it:
The Syntax is :
FieldModifiers:
FieldModifier
FieldModifiers FieldModifier
( Which, in lex terms means that the token FieldModifiers consists of either FieldModifier or FieldModifiers and a FieldModifier )
( the token FieldModifier is defined as )
FieldModifier: one of
public protected private
static final transient volatile
"A compile-time error occurs if the same modifier appears more than once in a field declaration, or if a field declaration has more than one of the access modifiers public, protected, and private."
"If two or more (distinct) field modifiers appear in a field declaration, it is cus-tomary, though not required, that they appear in the order consistent with that shown above in the production for FieldModifier."
So I guess that there is no such restriction according to JLS.
cheers,
vivek