Who was the one who invented OOP?
(a) Andrea Ferro
(b) Adele Goldberg
(c) Alan Kay
(d) Dennis Ritchie
(c) Alan Kay
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
Which of these keywords is used to define packages in Java?
a) pkg
b) Pkg
c) package
d) Package
c) package
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*/ };
Which of these functions is called to display the output of an applet?
a) display()
b) paint()
c) displayApplet()
d) PrintApplet()
b) paint()
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
How many kinds of access specifiers are given in OOP (C++)?
(a) 4
(b) 3
(c) 2
(d) 1
(b) 3
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
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
Which of these methods is a part of Abstract Window Toolkit (AWT) ?
a) display()
b) paint()
c) drawString()
d) transient()
b) paint()
Which was the initial object oriented programming language created?
(a) Kotlin
(b) SmallTalk
(c) Java
(d) C++
(b) SmallTalk
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
Which of these access specifiers can be used for an interface?
a) Public
b) Protected
c) private
d) All of the mentioned
a) Public
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
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
When OOP concept did first come to light?
(a) 1980’s
(b) 1995
(c) 1970’s
(d) 1993
(c) 1970’s
Which among the following would show polymorphism?
(a) Overloading &&
(b) Overloading<<
(c) Overloading ||
(d) Overloading +=
(b) Overloading<<
Which of the following package stores all the standard java classes?
a) lang
b) java
c) util
d) java.packages
b) java
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
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
Which feature of OOP shows a lot about code reusability?
(a) Abstraction
(b) Polymorphism
(c) Encapsulation
(d) Inheritance
(d) Inheritance
Which access specifier can be normally used for data members of a class?
(a) Protected
(b) Private
(c) Public
(d) Default
(d) Default
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
Which of these keywords is used to manually throw an exception?
a) try
b) finally
c) throw
d) catch
c) throw
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