News Ticker

Access and Non-Access Modifiers

This table shows what modifiers are legal to use with classes, variables and methods.

Modifiers Classes Variables Methods
private Yes Yes
package default Yes Yes Yes
protected Yes Yes
public Yes Yes Yes
final Yes Yes Yes
static Yes Yes
abstract Yes Yes (no body)
synchronized Yes
strictfp Yes Yes
native Yes (no body)
transient Yes
volatile Yes

Leave a Reply

%d bloggers like this: