x
Info
x
Warning
x
Danger
 / 
 / 
 / 
Chapter 4- True/False    Classes which share a role or capability but

Question : Chapter 4- True/False    Classes which share a role or capability but : 2043797

Chapter 4-

True/False

  1.    Classes which share a role or capability but have little else in common can be grouped together using an interface.

  1.    A class that implements at least one of the abstract methods specified in an interface is said to implement the interface.

 

  1.    A class can implement only one interface.
  2.    It is possible to build a hierarchy of interfaces in Java.
  3.    The textbook recommends that instance variables be declared in the following order: attributes, then components and finally peer objects.

  1.    Peer objects are initialized in the constructor by instantiating a new object for every peer, according to the class-definition recipe.

  1.    The keyword this followed by parentheses (i.e. this();) will invoke the constructor with no parameters of the same class in which the statement appears.
  2.    The default value recipe, says the parameterized constructor for the same class should be invoked with the default value as the parameter when writing the default constructor.
  3.    A Java interface can contain both abstract and concrete methods.

Answer False. A Java interface contains only abstract methods.

  1. The correct Java syntax for saying that class Toy implements the interface Moveable is: public class Toy extends Moveable { . . .}

Solution
5 (1 Ratings )

Solved
Computer Science 2 Years Ago 163 Views
This Question has Been Answered!
Unlimited Access Free
Explore More than 2 Million+
  • Textbook Solutions
  • Flashcards
  • Homework Answers
  • Documents
Signup for Instant Access!
Ask an Expert
Our Experts can answer your tough homework and study questions
154368 Computer Science Questions Answered!
Post a Question