Type

Valid Promotions

double

none

float

double

long

float or double

int

long, float or double

char

int, long, float, or double

short

int, long, float, or double, but not char

byte

short, int, long, float, or double, but not char

Boolean

None (Boolean values are not considered to be numbers in Java)

Package

Description

java.applet

The Java Applet Package contains a class and several interfaces required to create Java applets – programs that execute in Web browsers.

java.awt

The Java Abstract Windows Toolkit Package contains the classes and interfaces required to create and manipulate GUIs in Java. In current versions of Java, the Swing GUI components of the javax.swing packages are often used instead.

java.awt.event

The Java Abstract Windows Toolkit Event Package contains classes and interfaces that enable event handling for GUI components in both the java.awt and javax.swing packages.

java.io

The Java Input/Output Package contains classes and interfaces that enable programs to input and output data.

java.lang

The Java Language Package contains classes and interfaces that are required by many Java programs. This package is imported by the compiler into all programs, so you do not need to do so.

java.net

The Java Networking package contains classes and interfaces that enable programs to communicate via computer networks like the Internet.

java.text

The Java Text Package contains classes and interfaces that enable programs to manipulate numbers, dates, characters and strings. The package provides internationalization capabilities that enable a program to be customized to a specific local.

java.util

The Java Utilities Package contains utility classes and interfaces that enable such actions as date and time manipulations, random-number processing (class Random), the storing and processing of large amounts of data and the breaking of strings into smaller pieces called tokens (class StringTokenizer).

javax.swing

The Java Swing GUI Components Package contains classes and interfaces for Java’s Swing GUI components that provide support for portable GUIs.

javax.swing.event

The Java Swing Event Package contains classes and interfaces that enable event handling (e.g. responding to button clicks) for GUI components in package javax.swing.

 

Hosted by www.Geocities.ws

1