-
How can we identify whether a compilation unit is class or interface from a .class file?
-
- We cannot differentiate between class and interface
- The class or interface name should be postfixed with unit type
- Extension of compilation unit
- Java source file header
- None of these
Correct Option: D
The Java source file contains a header that declares the type of class or interface, its visibility with respect to other classes, its name and any superclass it may extend, or interface it implements.