Programming  Java  Package and Interface

21. Which of these keywords is used by a class to use an interface defined previously?

import Import implements Implements

Share QNo: 21

22. Which of the following is correct way of implementing an interface salary by class manager?

class manager extends salary {} class manager implements salary {} class manager imports salary {} None of the mentione

Share QNo: 22

23. Which of the following is incorrect statement about packages?

Interfaces specifies what class must do but not how it does. Interfaces are specified public if they are to be accessed by any code in the program. All variables in interface are implicitly final and stati All variables are static and methods are public if interface is defined pubic.

Share QNo: 23

24. Which of the following package stores all the standard java classes?

lang java util java.packages

Share QNo: 24

25. interface is used to achieve

single inheritance mutiple inheritance Hierarchical inheritance hybrid inheritance

Share QNo: 25


*Click on the QNo to display a Question.

Total Ans