Level 32 Level 34
25 words 0 ignored
Ready to learn Ready to review
Check the boxes below to ignore/unignore words, then click save at the bottom. Ignored words will never appear in any learning session.
Accessible by any class in the program.
Wich access modifier has acces to a: class, Package, subclass
it can be seen in the same class and the same package, but not by the subclass or the world.
In the spirit of encapsulation, it is common to make fields _______ .
Final - cannot change it's value
Abstract - No body, only signature. The enclosing class is abstract
Public - Accessible anywhere
Applied to variables
Introduces a path of execution to take when no case is a match in a switch statement.
Indicates that a variable or method belongs to a class, rather than to any object created from the class.
constant variables are defined with the word:
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.
for INSTANCE Methods
for STATIC Methods
Non-Access Modifiers for