Core Java Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 1646 Page Views: 

What is a Java package and how is it used?



Posted By: Avi Date: 12 September 2009 08:19:01 PM
 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.


Posted By: eTechPlanet


Date: 12 September 2009 08:19:01 PM

Package is a separate naming context for the group of classes and interfaces.It provides a high level layer of access protection and name space management.Packages can have access specifiers.


Posted By: Johndecruse


Date: 13 February 2010 12:35:36 AM
Post a better Answer if you have
 
(Will show your Gravatar icon)  
  Country flag

Loading
Enter the text as shown in the image y0EsiO
Related Questions
Core Java : What is a marker interface ?

What is a marker interface ?

It is an interface that doesn’t contain methods and it is used to mark java classes that support cer....
Category: Core Java Date: 11/6/2010 4:25:51 PM
Core Java : What is the List interface?

What is the List interface?

The List interface provides support for ordered collections of objects
Category: Core Java Date: 11/6/2010 4:13:55 PM
Core Java : What is the highest-level event class of the event-delegation model?

What is the highest-level event class of the event-delegation model?

The java.util.EventObject class is the highest-level class in the event-delegation class hierarchy.
Category: Core Java Date: 11/6/2010 2:35:53 PM
Core Java : Can the constructor be declared private?

Can the constructor be declared private?

Yes, in this case, you can’t create any instance for this class by using new.
Category: Core Java Date: 11/6/2010 2:15:46 PM
Core Java : What is the purpose of the System class?

What is the purpose of the System class?

The System class provides access to system resources.
Category: Core Java Date: 11/6/2010 2:03:52 PM