Home > Java > JavaBase > What are the commonly used libraries in Java?

What are the commonly used libraries in Java?

angryTom
Release: 2019-11-12 15:15:42
Original
3858 people have browsed it

What are the commonly used libraries in Java?

What are the commonly used libraries in java

1, java.lang Package (Recommended tutorial: java tutorial)

The java.lang package is the most commonly used package in Java. The program can use this package without injection. The classes in the package can be used to design the most basic Java programs.

2. java.awt package

The classes in the java.awt package provide methods for creating graphical interfaces, including buttons, text boxes, list boxes, containers, Creation and setting of elements such as fonts, colors and graphics.

3. javax.swing package

javax.swing package provides creation classes for graphical interfaces written in Java. Interface elements created using classes in the javax.swing package can Adjust to the interface styles of various operating systems and support the development of interfaces for various operating platforms. In addition, the swing package also provides classes for tree controls, tab controls, and table controls. Many classes in the Java.swing package are inherited from classes in the java.awt package. Java retains the use of the java.awt package to maintain technical compatibility, but the javax.swing package should be used as much as possible to develop program interfaces.

4. java.io package

The classes in the java.io package provide system input and output control in the form of data flow, and read and write serialization of files and objects. , the more commonly used classes include: BufferInputStream, BufferOutputStream, BufferedReader, BufferedWriter, DataInputStream, DataOutputStream, FileInputStream and FileOutputStream, etc.

5. java.util package

java.util package provides time and date, random numbers, and lists, sets, hash tables and stacks to create complex data structures. Class, the more common classes are: Date, Timer, Random and LinkedList, etc.

6, java.net package

java.net package provides support for network development, including the Serversocket class and client Socket that encapsulate the Socket socket function classes as well as URL classes for accessing various resources on the Internet.

7. java.applet package

java.applet package has only one Applet class, which is used to develop Applet applet on the web page to make the web page more interactive. capabilities as well as multimedia and network functions.

The class libraries in these seven packages are the most basic and commonly used ones in the Java programming language, and they must be mastered proficiently. Only in this way can we improve efficiency in learning the Java programming language and get twice the result with half the effort.

The above is the detailed content of What are the commonly used libraries in Java?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template