java package and commonly used classes

1.java.lang: Language Pack

2.java.util: practical package

3.java.awt: Abstract Window Toolkit

 4.java.io: input and output packet

 

①.java.lang: Language Pack

This is the core package of the Java language, the system automatically to the user program introduced this package, the package main categories are:

1.object categories: it is all the parent class, which defines methods other classes may be used.

2. Data type packaging: simple data types of packaging, including Integer, Float, Boolean and so on.

3. Mathematic Math: providing mathematical functions and constants including constants E and PI and abs (), sin (), cos (), min (), max (), random () method and the like, and these methods are constants still.

4. String Class String and StringBuffer class.

The system and runtime classes: System class provides a particular computer system resources independent of programming interface; the Runtime class runtime resources can be accessed directly.

6. Operation classes: Class and ClassLoader classes. Class class provides a number of information objects runtime, ClassLoader is an abstract class, it provides a method for converting the class name and the file name to locate and load the file in the file system.

7. Thread class: Thread class. Java is a multithreaded environment, there are Thread (thread establishment), ThreadDeath (clean-up operation after the end of the thread), ThreadGroup (organized a group of threads) and Runnable (by creating a thread of interactive tools) and other categories.

8. error and exception handling categories: Throwable (parent of all errors and exception handling), Exception (exception process, the user needs to capture process) and Error (error processing hardware, the user is not required to capture processing).

9. Process class Process: It supports system process, when the utility class Runtime to execute system commands, will create the Process class processing system processes.

 

②. The utility pack

Package provides a useful class of useful features, including the date classes, class data structures and a random number and the like.

1. Date: including Date (date and time of acquisition), Calendar (abstract class, the class calendar) and the GregorianCalendar (class subclasses Calendar) class.

2. Data structures: including objectlist LinkedList, vector class Vector, and Stack Stack class class Hashtable hash table and the like.

3. The random number based Random: it encapsulates random Method Math class, and provides more auxiliary functions.

3. Abstract Window Toolkit

Java provides the java.awt drawing and image-based, GUI program primarily for writing, including buttons, labels and other common components and the corresponding event class.

1. The component classes include: Button, Panel, Label, Choice other categories, for designing a graphical interface.

Event Package 2: class include various interface and event handling at the java.awt.event

3. Package Color: the color of the classes for providing in java.awt.color.

4. Font package: in java.awt.font provided for font-related classes and interfaces.

4.io package: 
a system reader classes and interfaces, as long as the input stream comprising a stream OutputStream classes inputStream and output to the transmission input and output files, data and network data transport pipeline can be achieved.

 

 

Guess you like

Origin www.cnblogs.com/tyadmin/p/11241480.html