Java Reference
In-Depth Information
8 . Can interfaces be extended?
Yes, interfaces can be extended.
9 . Create an interface for the Vehicle class from Chapter 7 . Call the interface IVehicle .
10 . Variables declared in an interface are implicitly static and final . Can they be shared
with other parts of a program?
Yes, interface variables can be used as named constants that are shared by all files in
a program. They are brought into view by importing their interface.
11 . A package is, in essence, a container for classes. True or False?
True.
12 . What standard Java package is automatically imported into a program?
java.lang
13 . What keyword is used to declare a default interface method?
default
14 . Beginning with JDK 8, is it possible to define a static method in an interface ?
Yes
Search WWH ::




Custom Search