Page 32 - CA_Blue( J )_Class10
P. 32
Output:
Title: The Story of Doctor Dolittle
Author: Hugh Lofting
Pages: 350
Note: This example illustrates how classes in Java function as user-defined data types, enabling
programmers to create complex data structures that model specific entities and their behaviours.
Let’s Revisit
® The concept of class and object is obtained by programs written using object-oriented programming languages such as
Java, C++, etc.
® A class consists of characteristics and behaviours.
® A class in Java is a non-primitive data type that acts as a blueprint for creating objects of the same type.
® Occurrence of a class which contains characteristics and behaviour of the same class are called an object.
MIND DRILL
Solved Questions
A. Tick ( ) the correct answer.
1. Which of the following is called an object factory?
a. Class b. Object
c. Both a and b d. None of these
2. Classes in Java are ………………… data types.
a. Non-primitive b. Primitive
c. Object d. None of these
3. Which of the following keyword is used to create an object of a class?
a. public b. new
c. static d. void
4. What does the term "class is an object factory" mean in Java?
a. A class is a blueprint for creating objects.
b. A class automatically generates object instances.
c. A class can store multiple objects.
d. A class defines a data structure for storing objects.
5. In Java, which keyword is used to create an instance of a class?
a. class b. instance
c. new d. create
6. Which statement is true about classes and objects in Java?
a. Classes can have multiple objects. b. Objects cannot be created without a class.
c. Objects define the structure of a class. d. Classes and objects are unrelated.
7. What is an object in Java?
a. A method within a class b. A blueprint for creating classes
c. An instance of a class d. A collection of methods
3030 Touchpad Computer Applications-X

