Modifiers and Features

Not all modifiers can be applied to all features.

Top-level classes may not be protected.

Methods may not be transient.

Static can apply it to free-floating blocks of code.

All Possible Combinations of Features and Modifiers

ModifierClassVariableMethodConstructorCode Block
publicyesyesyesyesno
protectednoyesyesyesno
empty accessoryesyesyesyesyes
privatenoyesyesyesno
finalyesyesyesnono
abstractyesnoyesnono
staticnoyesyesnoyes
nativenonoyesnono
transientnoyesnonono
volatilenoyesnonono
synchronizednonoyesnoyes
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.