Quiz

Review today's material by taking this three-question quiz.

Questions

1:What is another word for a class?
  1. Object

  2. Template

  3. Instance

2:When you create a subclass, what must you define about that class?
  1. It already is defined.

  2. Things that are different from its superclass.

  3. Everything about the class.

3:What does an instance method of a class represent?
  1. The attributes of that class.

  2. The behavior of that class.

  3. The behavior of an object created from that class.

Answers

A1: b. A class is an abstract template used to create objects that are similar to each other.
A2: b. You define how the subclass is different from its superclass. The things that are similar are already defined for you because of inheritance. Answer a is technically correct, but if everything ...

Get Sams Teach Yourself Java 2 in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.