wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Elementary Concepts of Class and Object

Total questions: 13

Worksheet time: 32mins

Name
Class
Date
1.

(a)   is a collection of objects that share common characteristics and behaviour.

2.

The (a)   of a class differs on various characteristics.

3.
In the statement 
 Bank tom = new Bank(5000.0);
Which is the class?
a)
Bank
b)
tom
c)
new
d)
5000.0
4.

True or False: Class is created based on objects.

a)

True

b)

False

5.

Which of the following is false with respect to a class?

a)

It is an object factory

b)

It is a template using which objects are created.

c)

It is an instance of a class

d)

It is a prototype of objects

6.
When we want to print in Java, we use the code ......
a)
system.out.print();
b)
System.out.println();
c)
System.Out.Printf();
d)
System.out.show();
7.

These have identity , state and behaviour

a)

object

b)

class

c)

function

d)

data menbers

8.

Define Object with an example.

4 lines
9.

Why is an Object called an 'Instance' of a class? Explain.

4 lines
10.

Write a statement to create an object 'Keyboard' of the class 'Computer'.

4 lines
11.

What is the significance of the keyword 'new' while creating an object?

4 lines
12.

Why is a class known as a composite data type?

4 lines
13.

What is the difference between a class and an object?

4 lines