Level 103 Level 105
Level 104

Core Java - Object Orientation


45 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?
Encapsulation helps ...
hide implementation details behind an interface (or API).
composition.
HAS-A refers to ...
HAS-A means ...
an instance of one class "has a" reference to an instance of another class or another instance of the same class.
inherit public and protected variables and methods of the superclass.
Inheritance allows a class to be a subclass of a superclass, and thereby ...
IS-A, polymorphism, overriding, overloading, and casting.
Inheritance is a key concept that underlies ...
All classes (except class Object), are ...
subclasses of type Object, and therefore they inherit Object's methods.
Polymorphism means ...
many forms, in other words subclasses of a class can define their own unique behaviors and yet share some of the same functionality of the parent class.
overridden instance methods.
Polymorphic method invocations apply only to ...
During runtime, only overridden instance methods are ...
dynamically invoked based on the real object's type.
overridden and overloaded.
Methods can be ...
Abstract method must be ...
overridden by the first concrete (non-abstract) subclass.
overridden.
Constructors are never inherited, thus they cannot be ...
Only inherited methods can be ...
overridden, and remember that private methods are not inherited.
Overloading means ...
reusing a method name, but with different arguments.
overloaded in a subclass.
Methods from a superclass can be ...
Polymorphism applies to ...
overriding, not to overloading.
which overridden method is used at runtime.
Object type (not the reference variable's type), determines ...
Reference type determines ...
which overloaded method will be used at compile time.
downcasting and upcasting.
There are two types of reference variable casting: ...
Downcasting is when ...
you can assign a reference variable that refers to a supertype object to a reference variable of the subtype but you must make an explicit cast to do this, and the result is that…
Upcasting is when ...
you can assign a reference variable that refers to a subtype object to a supertype reference variable explicitly or implicitly. This is an inherently safe operation because the assignment restricts the access capabilities of the new variable.
You implement an interface by properly and concretely ...
overriding all of the methods defined by the interface.
many interfaces.
A single class can implement ...
A constructor is always ...
invoked when a new object created.
a constructor called.
Each superclass in an object's inheritance tree will have ...
at least one constructor.
Every class, even an abstract class, has ...
Constructors must have ...
the same name as the class.
return type.
Constructors don't have a ...
Constructors can use ...
any access modifier (even private!).
The compiler will create ...
a default constructor if you don't create constructors in your class.
The default constructor is ...
a no-arg constructor with no-arg call to super().
The first statement of every constructor must be ...
a call to either this() (an overloaded constructor) or super().
the super constructor runs.
Instance members are accessible only after ...
called when a concrete subclass instantiated.
Abstract classes have constructors that are ...
constructors.
Interfaces do not have ...
A constructor can be ...
directly invoked only by another constructor (using a call to super() or this()).
All static members belong to ...
the class, not to any instance.
an instance variable directly.
A static method cannot access ...
Static methods can't be ...
overridden, but they can be redefined.
Coupling refers to ...
the degree to which one class knows about or uses members of another class.
Loose coupling is ...
the desirable state of having classes that are well encapsulated, minimize references to each other, and limit the breadth of API usage.
Tight coupling is ...
the undesirable state of having classes that break the rules of loose coupling.
Cohesion refers to ...
the degree in which a class has a single, well-defined role or responsibility.
High cohesion is ...
the desirable state of a class whose members support a single, well-defined role or responsibility.
Low cohesion is ...
the undesirable state of a class whose members support multiple, unfocused roles or responsibilities.