What is a Java package and how is it used?

Answer :
A Java package is a naming context for classes and interfaces. A package is used to create a separate name space for groups of classes and interfaces. Packages are also used to organize related classes and interfaces into a single API unit and to control accessibility to these classes and interfaces.

0 comments:

Post a Comment

 
Copyright © Interview Questions and answers - Blogger Theme by BloggerThemes & freecsstemplates - Sponsored by Internet Entrepreneur