JOIN ADRE 2.0 Telegram Group

Packages and Interfaces - Objective Type Questions with Answers on Core Java

1 Math class belongs to the package
A java.math
B java.lang
C java.util
D none of these

Answer: Option [B]

java.lang package contain math class. This class contain basic methods to perform mathematical operations.

2 What class must be extended by all event classes?
A java.util.EventListener
B java.awt.AWTEvent
C java.util.EventObject
D java.awt.event.InputEvent

Answer: Option [C]

java.awt, java.awt.event and java.beans uses the class java.util.EventObject



3 What is the name of the Collection interface used to represent elements in a sequence?
A Collection
B Set
C List
D Map

Answer: Option [C]

The List is a collection interface which permits duplicates and represent elements in a particular order.

4 Which of the following statement is false?
A Variables declared inside of interface declaration may be changed by implementing class
B Interfaces are designed to support dynamic method resolution at run time
C When an interface method is implemented it must be declared as public
D Variables declaration are implicitly final

Answer: Option [A]

Java interface variables are static and final. They cannot be changed.

5 Which of the following classes directly implement Set interface?
A Vector
B HashSet
C LinkedList
D HashTable

Answer: Option [B]

Take Mock Tests

Government Schemes Mock Test Start Test!
Political Science Mock Test – 42 Start Test
History Test – 190 Start Test
Quantitative Aptitude Test Start Test!
Trigonometry - Mock Test Start Test!
Data Interpretation - Mock Test Start Test!
General Awareness - Mock Test Start Test!
Reasoning Ability - Mock Test Start Test!
Englist(Antonyms) Mock Test 1 Start Test!
Quantitative Aptitude (Percentage) Mock Test Start Test!
Economy Mock Test 1 Unlock Test!
Books & Authors - Test 2 Unlock Test!