Java Common Packages

Source: Internet
Author: User
Tags generator

Java uses the package structure to organize and manage classes and interface files. This article introduces several common packages in the Java language Library, because these packages are often needed in software development and applications, and some of them are necessary. If you leave it, you really can't do anything.

First Package: Java.lang package.

"The package provides the basic class for programming in the Java language, which is the default imported package," says the CIA . The Runnable interface inside the package and the object, Math, String, StringBuffer, System, Thread, and Throwable classes need to be focused, because they are widely used.

Second Package: Java.util package.

The package provides a collection framework, legacy collection classes, event models, date and time implementations, internationalization, and various utility classes (string tag generator, random number generator, and bit array).

Third Package: Java.io package.

The package provides input and output of the system through file system, data flow and serialization.

Package Fourth: java. NET package.

"The package provides classes for network applications and development," said the CIA .

Fifth package: java.sql bag.

The package provides access to and processing of data APIs stored in a data source (typically a relational database) using the Java language.

Sixth bag: java.awt bag

Seventh package: Javax.swing bag.

"These two packages provide the GUI design and development classes," said the CIA . The java.awt package provides all the classes for creating an interface and drawing graphics images, while the Javax.swing package provides a set of "lightweight" components that try to make these components work the same way on all platforms.

Eighth package: Java.text bag.

"It provides classes and interfaces that deal with text, dates, numbers, and messages in a way that is not related to natural language," says the CIA .

With regard to these package structures, except that the first package is auto-import, the remaining packages need to be imported using the import statement to use the classes and interfaces within their packages. To learn more about them, read the JDKAPI documentation and use the classes and interfaces in these packages to solve problems and meet your needs.

Summarize

1) The Java language uses package structure to organize and manage classes and interfaces, avoid naming conflicts, and be structured and clear.

2) focus on the above-mentioned common packages, but actually master the application of the class and interface under these package structures. Use them, add ideas, design and create a "product"

Reference

http://blog.csdn.net/wangloveall/article/details/8029157

Java Common Packages

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.