You are on page 1of 2

1.

Encapsulation is principle [ ]
A) Which allows any object to derive and reuse the characteristics of another object
B) which facilitates the object to hide its implementation and expose only the interfaces
C) which allows any object to expose only the object attributes
D) which makes any object to behave differently depending upon the input object or the
calling object

2. Which is the process by which one class acquires the properties of another class?
A ) Abstraction B ) inheritance C ) class D ) polymorphism [ ]

3.Choose the correct syntax of a Java Package below [ ]


A ) package PACKAGE_NAME; B )package PACKAGE_NAME.*; C) pkg
PACKAGE_NAME.*; D ) pkg PACKAGE_NAME;

4. Which of the below is reserved keyword in Java [ ]


A ) data B ) overriding C ) int D ) array

5. A class that inherits from more than one super class can also be defined. This is called
A ) multiple B ) multilevel C ) hierarchical D ) single [ ]

6. “shape” is the root class, polygon is derived class from “shape” class “polygon” is the
super class for “triangle” this is called [ ]
A ) multiple B ) multilevel C ) hierarchical D ) single

7._____________it provides automatic initialization of objects [ ]


A ) constructor B ) class C ) destructor D ) object

8. Process of defining the methods with the same name and signature in derived class
which already exist in the base/parent class [ ]
A ) Inheritance B ) early binding C ) method overriding D ) composition

9.________is a valid modifier [ ]


A) lang B ) public C ) System D ) math

10. Which of the following is used to create the user defined data type [ ]
A) Object B ) system C ) class D ) none

11.How many Keywords are there in java. ( )


A)30 b)50 c) 35 d)29

12.Which of the following is not a keyword ( )


A)final b)static c)Local d)float

1. Interface consists of___________________.


2._________________to implements multiple inheritance in Java.

3._________class does not instantiate the objects.

4. _______ is supposed to create list of named constants.

5. Package is accessed through__________________keyword.

6. Object is__________________.

7.Ploymorphism means____________________.

8.________ methods it compares another string. It doesn't check case.

9. Syntax for main method in java__________________________.

10. Java Virtual Machine used for _________________

11.OOP stands for________________.

12.Array is ________________.

13.Interfcae is implemented through__________ keyword .

You might also like