Level 32 Level 34
Level 33

[Quiz] Modifier Types


25 words 0 ignored

Ready to learn       Ready to review

Ignore words

Check the boxes below to ignore/unignore words, then click save at the bottom. Ignored words will never appear in any learning session.

All None

Ignore?
public
Accessible by any class in the program.
protected
Wich access modifier has acces to a: class, Package, subclass
default access
it can be seen in the same class and the same package, but not by the subclass or the world.
private
In the spirit of encapsulation, it is common to make fields _______ .
Field Modifiers
Final - cannot change it's value
Method Modifiers
Abstract - No body, only signature. The enclosing class is abstract
Class Modifiers
Public - Accessible anywhere
Final Modifier
Applied to variables
default
Introduces a path of execution to take when no case is a match in a switch statement.
static
Indicates that a variable or method belongs to a class, rather than to any object created from the class.
final
constant variables are defined with the word:
abstract
Indicates that the details of a class, a method, or an interface are given elsewhere in the code.
<default> Class Access Modifier
no modifier; package-level access: can be seen only by classes within the same package.
public Class Access Modifier
all classes from all packages have access. All classes in the Java Universe (JU); Include if in other package.
final Class nonaccess Modifier
The Class can't be subclassed. No other class can ever extend (inherit from) - gives compile error.
abstract Class nonaccess Modifier
The Class can never be instantiated (with new). It's purpose is to be extended (subclassed)
abstract method nonaccess Modifier
Ends with a semicolon rather than curly brace pair. Abstract methods require the Class to be abstract too.
public Member Access Modifier
All other classes, regardless of package, can access the member (assuming the class itself is visible).
private Member Access Modifier
Can't be accessed by code in any other class other than the one that declares the member.
protected Member Access Modifier
Like <default> with package-level access but also can be accessed (via inheritance) by a subclass (even if subclass is in different packagea). Package + Kids.
<default> Member Access Modifier
May be accessed only if the class accessing the member belongs to the same package.
protected Member Access Modifier details
If outside the package, the subclass can see the protected member only through inheritance.
INSTANCE Methods
Non-Access Modifier
Non-Access Modifiers
for INSTANCE Methods
for STATIC Methods
Non-Access Modifiers for