Java: Object-Oriented Concepts

¡Supera tus tareas y exámenes ahora con Quizwiz!

The ______ method compares the data in objects

.equals()

The Object class provides three important methods to all of its children: _____, _____, and _____

.equals(), .toString(), .hashCode()

______ cannot be instantiated

Interfaces and abstract classes

In Java, all classes inherit from the ______ class by default

Object

______ is when a subclass redefines a method of it's parent class

Overriding

An ______ does not have a body

abstract method

public & private are examples of ______________

access modifiers

In Java 8, an interface can contain method bodies if it uses the ______ keyword

default

A public member of a class is visible to ______

everything

In Java, a class can ______ up to one other class to inherit from it

extend

Interfaces can be ______ by other interfaces

extended

The keyword used to inherit a class or abstract class is ________

extends

Inheritance is a mechanism in which one class can inherit the ______ of another "parent" class

fields and methods

Interfaces can be ______ by classes or abstract classes

implemented

The keyword used to inherit an Interface is...

implements

The ______ operator can be used to check if an object is of a specific type or is a subtype of that type.

instanceof

A package-private member of a class is visible to ______

members of the same package

An abstract method only has a ______

method signature

Can a class extend multiple classes?

no a class can only extend 1 other class

A private member of a class is visible to ______

only the defining class

private members and static methods cannot be ______

overriden

The default access modifier is ______

package-private

______ are not inherited

private and static members

A protected member of a class is visible to ______

subclasses and members of the same package

To call the constructor of a parent class, you must use the ______ keyword

super

Taking an object reference and treating it as a reference to its base type is called _____

upcasting


Conjuntos de estudio relacionados

Pharmacological Methods of Pain Relief Sherpath

View Set

Art Talk Chapter 3: The Media and Processes of Art

View Set

Nutrition Exam 3 Collection - 16

View Set

Civics - Lesson 2 - The United States Constitution - Exam

View Set