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 this QA

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

Vector HashSet LinkedList HashTable

Share this QA

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

Set SortedSet SortedMap List

Share this QA

14. Which of the following is the correct syntax for suggesting that the JVM performs garbage collection?

System.free() System.setGarbageCollection() Syste.out.gc() System.gc()

Share this QA

15. For which purpose packages are used in Java?

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

Share this QA

16. The first statement in java source file

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

Share this QA

17. A package is a collection of

classes interfaces editing tools classes and interfaces

Share this QA

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

interface Interface intf Intf

Share this QA

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

Objects Packages Interfaces None of the Mentione

Share this QA

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

Public Protected private All of the mentioned

Share this QA

 

*Click on the QNo to display a Question.

Total Ans