Java Programming  «Prev  Next»

Object Oriented Programming in Java - Quiz

Each question is worth one point. Select the best answer for each question.

 
1. What are the two common characteristics shared by all objects?
Please select the best answer.
  A. Methods and interfaces
  B. State and behavior
  C. Methods and messages

2. What really happens when a message is sent to an object?
Please select the best answer.
  A. A method is called on that object.
  B. A member variable is set for that object.
  C. A text string is assigned to the object.

3. When a class is based on another class, it inherits:
Please select the best answer.
  A. The data and methods for the class
  B. The methods and messages for the class
  C. Only the data for the class


4. OOP promotes a way of programming that allows programmers to think in terms of:
Please select the best answer.
  A. Data
  B. Procedures
  C. Objects


5. What is a template, or specification, that defines a type of object?
Please select the best answer.
  A. A class
  B. A prototype
  C. A framework


6. What Java keyword do you use to define a class?
Please select the best answer.
  A. define
  B. new
  C. class

Your score is 0.0