Packages and Interfaces - Core Java MCQ Questions and Answers - Exam Quiz
Questions
6
TreeMap class is used to implement which one of the following collection interfaces?
Answer: Option [B]
TreeMap class is used to implement SortedMap.
7
Which of the following is the correct syntax for suggesting that the JVM performs garbage collection?
Answer: Option [D]
System.gc() is a program that runs for garbage collection. But it not reliable.
⭐ Make GKSeries Your Preferred Source on Google
Add GKSeries as Preferred Source
8
For which purpose packages are used in Java?
Answer: Option [B]
Java packages resolves the name conflicts among different classes.
10
A package is a collection of
Answer: Option [D]
A package is a collection of classes, methods and interfaces.