Page 1
Java: Classes and Objects Latest
Questions and Correct Answers
Objects have two properties. One is state. What is the other?
Ans: Behavior
The state of an object is stored in _____ _____
Ans: Instance variables
The behavior of an object is represented by ______ ______
Ans: Instance methods
The job of a _____ is to initialize instance variables at the
time an object is created.
Ans: Constructor
Nested inside a class declaration are three kinds of
declarations. What are they?
Ans: Constructor declarations
Variable declarations
Method declarations
The words public and private are _____ _____
Java: Classes and Objects Latest
Questions and Correct Answers
Objects have two properties. One is state. What is the other?
Ans: Behavior
The state of an object is stored in _____ _____
Ans: Instance variables
The behavior of an object is represented by ______ ______
Ans: Instance methods
The job of a _____ is to initialize instance variables at the
time an object is created.
Ans: Constructor
Nested inside a class declaration are three kinds of
declarations. What are they?
Ans: Constructor declarations
Variable declarations
Method declarations
The words public and private are _____ _____