What is a Java Package

by Gabriela C. Perez.

Share
|
Homepage | Submit your article | Contact | TOS
More articles on java  

You are here: Categories » Computers and technology » JAVA

A Java package is a collection of related classes that can be imported into your program to support your software. They also provide namespace management, as well as access protection.

Note :A namespace is the scope of the name of a variable.

The following table shows some of the main packages that are included in the recent Java 1.4 SDK (Software Development Kit) release along with a brief description of what they include.

Package Description
java.lang This is the fundamental Java package containing classes essential to the Java language. This package is included in your program by default and contains many useful classes, such as String, Thread, and the primitive data type support classes.
java.io The I/O package contains classes that allow support for input and output operations.
java.awt This is the Abstract Window Toolkit package and contains all the necessary classes to create a GUI within your Java applications and applets.
java.awt.event This package is used to support the Abstract Window Toolkit by containing classes for event handling.
java.awt.image This package provides important classes for storing and manipulating images, most notably the BufferedImage and VolatileImage classes
javax.swing The Swing package, as with the AWT package, is used to create a GUI. However, Swing is the newer of the two and, in our opinion, the best one to use
javax.swing.event As with the java.awt.event package, this includes extra event handling functionality to support the javax.swing package.
java.util The utility package contains many useful classes, including storage classes such as ArrayList and LinkedList.
java.net This package contains everything you need to handle basic networking in Java.
java.nio This is a new package to the 1.4 release and contains classes used to implement NIO (New I/O).
java.sql Finally, we have the SQL package, which gives us database support within Java.

Although there are many other packages within the Java language, the above list is probably the most common that you will come across. Let's now take a look at how we can use and import these standard packages into our Java applications and applets.

Leave a comment or ask a question
Total comments: 0

JAVA Disclaimer

  • The e-articles directory is not responsible for any and all copyright infringements by writers and authors. If you suspect the information contained by this page for any copyright infringements, please contact us to investigate the issue
What should you know before you ship your Java applet ~ The perfectly finished applet - Stop! Before you let the whole world know about your applet, make sure the answer to all of the following questions is yes: 1. Have you removed or disabled debugging output? (more...)
Deploying Java Applets in a Mixed Browser Environment - You can deploy applets for users of both Internet Explorer and the Mozilla family of browsers in one of two ways: Through pure HTML Through JavaScript Using Pure HTML (more...)
General Java Applet Deployment Considerations - How you deploy an applet depends on whether users access the Web page through the Internet or an Intranet, and the type of browser they use. Note this information about your users, then follow (more...)
Why Java programmers are taking one step ahead in software development industry - Various high quality programming languages are used in the Software Industry. Some of them are expensive, while some are affordable by nature, however all of these are vastly used according to the (more...)
SELECTION STATEMENTS IN JAVA - Like other programming languages java offers the control statements to control the execution of a program. The control statements in java are the selection statements, loop constructs and the jump (more...)
JAVA and its Advantages - In today's highly competitive world, JAVA has become one of the most secure technologies for website and software development. Prime benefits of JAVA are platform independency and easy availability (more...)
Java Tactics: Earn A Fortune With Java - Get the right Knowledge Get the right Papers Get the right Direction Get the Money Hi, my name's (more...)
Introduction to Object Oriented Programming (OOP) - The transition from a procedural programming (non-OOP) language to an object-oriented programming language is a large step for many programmers. It is true that both methods of programming can ulti (more...)
Operator Precedence in programming languages - Operator precedence deciphers the order in which calculations in an expression occur. Looking at the calculation example 3 + 4 * 6, the answer could be calculated by adding 3 and 4, which gives (more...)
Arithmetic Assignment Operators - The following assignment operators are similar to the increment and decrement operators that we have just seen. They are used so that you do not need to enter the source variable twice when ass (more...)

 
free content
    Copyright © 2006 - 2012 e-articles.info.
The texts, articles and tutorials in the directory are property of their respective owners and authors.