Programming  Java  Package and Interface

11. Which of the following statement is false?

Variables declared inside of interface declaration may be changed by implementing class Interfaces are designed to support dynamic method resolution at run time When an interface method is implemented it must be declared as public Variables declaration are implicitly final

Share QNo: 11

12. Which of the following classes directly implement Set interface?

Vector HashSet LinkedList HashTable

Share QNo: 12

13. TreeMap class is used to implement which one of the following collection interfaces?

Set SortedSet SortedMap List

Share QNo: 13

14. Which of the following is the correct syntax for suggesting that the JVM performs garbage collection? System.setGarbageCollection() Syste.out.gc() System.gc()

Share QNo: 14

15. For which purpose packages are used in Java?

Categorizes data Organizing java classes into namespaces For faster compilation None of these

Share QNo: 15

16. The first statement in java source file

import statement package statement main statement try{} and catch{}

Share QNo: 16

17. A package is a collection of

classes interfaces editing tools classes and interfaces

Share QNo: 17

18. Which of these keywords is used to define interfaces in Java?

interface Interface intf Intf

Share QNo: 18

19. Which of these can be used to fully abstract a class from its implementation?

Objects Packages Interfaces None of the Mentione

Share QNo: 19

20. Which of these access specifiers can be used for an interface?

Public Protected private All of the mentioned

Share QNo: 20


*Click on the QNo to display a Question.

Total Ans