Java Quiz 53 & 53B

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

What is an interface?

An interface is a collection of constants and method declarations.

When a class implements an interface, what must it do?

It must declare and provide a method body for each method in the interface.

Can an interface be given the private access modifier?

No—then the interface could never be used.

Is the following a correct way to start out a class definition:

Yes—SomeClass is automatically a child of the class Object.

Can an interface name be used as the type of a variable, like this: public static void

Yes—the variable can refer to any object whose class implements the interface.


Ensembles d'études connexes

Medical Laboratory Science Review Harr. - 3.3 Immunology and Serology: Infectious Disease

View Set

Integumentary/Musculoskeletal NCLEX prep

View Set

Chapter 15 vital signs True or false

View Set