IS - Java Chapter 10

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

TRUE OR FALSE: An object of a class that implements an interface may be thought of as an object of that interface type.

True.

______ involves using a superclass variable to invoke methods on superclass and subclass objects, enabling you to "program in the general."

Polymorphism

If a class contains at least one abstract method, it's an ______ class.

abstract

Methods that are not interface methods and that do not provide implementations must be declared using keyword _____.

abstract

TRUE OR FALSE: All methods in an abstract class must be declared as abstract methods.

False. An abstract class can include methods with implementations and abstract methods.

TRUE OR FALSE: If a superclass declares an abstract method, a subclass must implement that method.

False. Only a concrete subclass must implement the method.

TRUE OR FALSE: Invoking a subclass-only method through a subclass variable is not allowed.

False. Trying to invoke a subclass-only method with a superclass variable is not allowed.

Classes from which objects can be instantiated are called _____ classes.

concrete

In Java SE 8, an interface may declare ______--that is, public methods with concrete implementations that specify how an operation should be performed.

default methods

Casting a reference stored in a superclass variable to a subclass type is called _____.

downcasting

As of Java SE 8, any interface containing only one method is known as a ______.

functional interface

As of Java SE 8, interfaces can now include ______ helper methods.

static


Set pelajaran terkait

4.1 Social Responsibility and Business Ethics

View Set

AP Comparative Government: Iran Review

View Set

Chapter 1 Accounting Information Systems & the Accountant- True/False

View Set

Chapter 8 + 9 | American National Government | Dr. Kiggins

View Set

Chapter 9-13 Exam Life Spam Development

View Set

Accounting-Statement of Cash flows

View Set

Seizure Practice Questions (Test #2, Fall 2020)

View Set