Below are the correct associations. If you have any questions, enter your query into the search box listed above.
- What refers to the current object instance?
Answer:
this
- What is the declaration of several methods with the same name but uses different parameter lists?
Answer:
method overloading
- Which keyword indicates that a variable may not be serialized?
Answer:
transient
- Which access modifier allows a class to be accessed outside of its package?
Answer:
public
- Which keyword indicates that a variable or method applies to a class rather than to specific instances of the class?
Answer:
static
- Which level of access restricts access to the package in which an item is declared?
Answer:
package access
- Which level of access restricts access to the class in which an item is declared?
Answer:
private
- Which keyword is used to declare constants, prevent methods from being overridden, and prevent classes from being extended?
Answer:
final
To stop a class from being extended, the class declaration must explicitly say it cannot be inherited.
This is achieved by using the "final" keyword:
public final class Account {
}
- Which access modifier restricts access to the class and subclasses in which an item is declared?
Answer:
protected
- What is the keyword used to describe declaring a method with the same name, parameter types, and return type as a method that is inherited from a superclass.
Answer:
overriding