Java includes the import statement to bring certain classes, or entire packages, into visibility. Once imported, a class can be referred to directly, using only its name… Read more »
FAQ
1. Can we instantiate an interface?
2. Can we create an object for an interface?
3. Can we define a variable in an interface ?and what type it should be ?
4. What modifiers are allowed for methods in an Interface?
5. Does importing a package imports the sub packages as well? E.g. Does importing com.bob.* also import com.bob.code.*?
6. What do you understand by package access specifier?
7. What is use of interface?
8. Is it is necessary to implement all methods in an interface?