Packages and Interfaces - Objective Type Questions with Answers on Core Java
Questions
1
Math class belongs to the package
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?
Answer: Option [C]
java.awt, java.awt.event and java.beans uses the class java.util.EventObject
⭐ Make GKSeries Your Preferred Source on Google
Add GKSeries as Preferred Source
3
What is the name of the Collection interface used to represent elements in a sequence?
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?
Answer: Option [A]
Java interface variables are static and final. They cannot be changed.
5
Which of the following classes directly implement Set interface?
Answer: Option [B]