Object Oriented Concepts
Class & Objects
Packages & Interfaces
Inheritance & Exception Handling
Applets & Swings
100

Who was the one who invented OOP?

(a) Andrea Ferro
(b) Adele Goldberg
(c) Alan Kay
(d) Dennis Ritchie

(c) Alan Kay

100

The feature by which one object can interact with another object can be called as _____________

(a) Message reading
(b) Message Passing
(c) Data transfer
(d) Data Binding  

(b) Message Passing

100

Which of these keywords is used to define packages in Java?
a) pkg
b) Pkg
c) package
d) Package

c) package

100

Which is the correct syntax of inheritance?

(a) class base_classname :access derived_classname{ /*define class body*/ };
(b) class derived_classname : access base_classname{ /*define class body*/ };
(c) class derived_classname : base_classname{ /*define class body*/ };
(d) class base_classname : derived_classname{ /*define class body*/ };

(b) class derived_classname : access base_classname{ /*define class body*/ };

100

Which of these functions is called to display the output of an applet?
a) display()
b) paint()
c) displayApplet()
d) PrintApplet()

b) paint()

200

Which can not be called a feature of OOP in general definitions?

(a) Efficient Code
(b) Code reusability
(c) Modularity
(d) Duplicate/Redundant data

(d) Duplicate/Redundant data

200

How many kinds of access specifiers are given in OOP (C++)?

(a) 4
(b) 3
(c) 2
(d) 1

(b) 3

200

Which of this access specifies can be used for a class so that its members can be accessed by a different class in the same package?
a) Public
b) Protected
c) No Modifier
d) All of the mentioned

d) All of the mentioned

200

Which type of members can’t be accessed in derived classes of a base class?

(a) All can be accessed
(b) Protected
(c) Private
(d) Public

(c) Private

200

Which of these methods is a part of Abstract Window Toolkit (AWT) ?
a) display()
b) paint()
c) drawString()
d) transient()

b) paint()

300

Which was the initial object oriented programming language created?

(a) Kotlin
(b) SmallTalk
(c) Java
(d) C++

(b) SmallTalk

300

Which constructor is going to be called from the object created in the below C++ code?

(a) Parameterized constructor
(b) Default constructor
(c) Run time error
(d) Compile time error

(d) Compile time error

300

Which of these access specifiers can be used for an interface?
a) Public
b) Protected
c) private
d) All of the mentioned

a) Public

300

When does Exceptions in Java arises in code sequence?

a) Run Time
b) Compilation Time
c) Can Occur Any Time
d) None of the mentioned  

a) Run Time

300

Which of these operators can be used to get run time information about an object?
a) getInfo
b) Info
c) instanceof
d) getinfoof

c) instanceof

400

When OOP concept did first come to light?

(a) 1980’s
(b) 1995
(c) 1970’s
(d) 1993

(c) 1970’s

400

Which among the following would show polymorphism?

(a) Overloading &&
(b) Overloading<<
(c) Overloading ||
(d) Overloading +=

(b) Overloading<<

400

Which of the following package stores all the standard java classes?
a) lang
b) java
c) util
d) java.packages

b) java

400

class Test extends Exception { }

class Main {

   public static void main(String args[]) { 

      try {

         throw new Test();

      }

      catch(Test t) {

         System.out.println("Got the Test Exception");

      }

      finally {

         System.out.println("Inside finally block ");

      }

  }

}

a) Got the Test Exception Inside finally block

b) Got the Test Exception

c) Inside finally block 

d) Compiler Error

a) Got the Test Exception Inside finally block

400

In Java, what do you call an area on the screen that has nice borders and various buttons along the top border?

a)  A window

b)  A screen

c) A box

d) A frame

d) A frame

500

Which feature of OOP shows a lot about code reusability?

(a) Abstraction
(b) Polymorphism
(c) Encapsulation
(d) Inheritance

(d) Inheritance

500

Which access specifier can be normally used for data members of a class?

(a) Protected
(b) Private
(c) Public
(d) Default

(d) Default

500

Which of these can be used to fully abstract a class from its implementation?
a) Objects
b) Packages
c) Interfaces
d) None of the Mentioned

c) Interfaces

500

Which of these keywords is used to manually throw an exception? 

a) try
b) finally
c) throw
d) catch

c) throw

500

Suppose you are developing a Java Swing application and want to toggle between various views of the design area. Which of the views given below are present for the users to toggle?

a) Design View

b) Requirements View

c)  Source View

d) Management View

b) Requirements View

M
e
n
u