Chapter 2
Elementary Concepts Of Objects and Classes
Question 1 ) Choose the correct option from the following.
1) A class is a collection of _______
(a) data
(b) objects
(c) methods
(d) variables
2) A __________ is a user defined aggregate data type.
(a) variable
(b) class
(c) method
(d) none of the above
3) The objects belonging to a class are called
(a) data
(b) state
(c) instance
(d) members
4) A class attributes are defined by _______
(a) variables
(b) class
(c) method
(d) none of the above
5) Behavior of a class of object is implemented using _______
(a) variable
(b) class
(c) method
(d) none of the above
Question 2) State True Or False.
1) Every object created from the same class will have different features.
(a) True
(b) False
2) Class is a factory of objects.
(a) True
(b) False
3) State and behavior of the objects are interlinked.
(a) True
(b) False
4) A class can also have its sub-class
(a) True
(b) False
5) A Java file have only one non-public class.
(a) True
(b) False