Home >Java >javaTutorial >What are the commonly used packages in Java?

What are the commonly used packages in Java?

青灯夜游
青灯夜游Original
2019-11-18 15:51:453674browse

What are the commonly used packages in Java?

#What are the commonly used Java packages?

Commonly used five

java.lang.*

Provides basic classes for programming using the Java programming language . The most important classes are Object (which is the root of the class hierarchy) and Class (instances of which represent classes in a running application). [Recommended learning: java course]

java.util.*

Contains the collection framework, legacy collection classes, event models, dates and Time facilities, internationalization and various utility classes (string token generator, random number generator and bit array, Date class, Stack class, Vector class, etc.). Collection classes, time processing modes, date and time tools and other commonly used tool packages

java.io.*

Java's core library java.io provides a comprehensive IO interface. Including: file reading and writing, standard device output, etc. IO in Java is based on streams for input and output. All data is serialized and written to the output stream, or read from the input stream.

java.net.*

Not all systems support the IPv6 protocol, and while the Java networking stack attempts to detect it and use it transparently when available, It can also be disabled using system properties. When IPv6 is unavailable or explicitly disabled, Inet6Address is no longer a valid parameter for most network connection operations. Although methods like java.net.InetAddress.getByName are guaranteed not to return an Inet6Address when looking up a hostname, it is still possible to create such an object by passing a literal value. In this case, most methods will throw an exception when called with Inet6Address.

java.sql.*

Provides an API for using the JavaTM programming language to access and manipulate data stored in a data source (usually a relational database). This API includes a framework that enables you to dynamically install different drivers to access different data sources.

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

Statement:
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