Java Packages List

In this post, I will be sharing the top 10 frequently used java packages. These packages are used in almost every java application. Here, we are using JDK 17 release as a reference to list important core java packages. Let's find out:

Read Also: Core Java Syllabus

10 Frequently Used Java Packages List

1. Java Lang Package (java.lang.*)


java.lang package is imported automatically, i.e. we can use the classes of this package directly in our program. You do not need to import this package because it contains the classes that are fundamental to the design of the Java programming language.

This package contains important classes like String, StringBuilder, Math, Integer, System, etc.

You can find the java.lang JavaDoc here.

2. Java Util Package (java.util.*)


java.util package contains the collections framework, legacy collection classes like Vector, internationalization and utility classes like a random-number generator or a string tokenizer.

This package contains important classes like ArrayList, HashMap, HashSet, etc.

You can find the java.util JavaDoc here.

3. Java IO Package (java.io.*)


java.io package provides serialization, system input/output through data streams, and the file system.

This package contains important classes like BufferedReader, BufferedWriter, File, InputStream, OutputStream,  etc.

You can find the java.io JavaDoc here.

4. Java Time Package (java.time.*)


java.time package provides the main API for times, dates, instants, and durations.

This package contains important classes like LocalDate, LocalTime, LocalDateTime, ZonedDateTime, etc.

You can find the java.time JavaDoc here.

5. Java SQL Package (java.sql.*)


java.sql package provides the API for accessing and processing the data stored in a datasource.

This package contains important interfaces like Connection, PreparedStatement, ResultSet, and classes like DriverManager, etc.

You can find the java.sql JavaDoc here.

6. Java Net Package (java.net.*)


java.net package provides classes and interfaces for implementing networking applications.

This package contains important classes like Socket, Proxy, Authenticator, URI, URL, etc.

You can find the java.net JavaDoc here

7. Java Math Package (java.math.*)


java.math package provides classes for performing arbitrary-precision decimal arithmetic (Big Decimal) and arbitrary-precision integer arithmetic (BigInteger).

This package contains important classes like RoundingMode, MathContext, BigInteger, BigDecimal, etc.

You can find the java.math JavaDoc here

8. Java Text Package (java.text.*)


java.text package provides classes and interfaces for handling numbers, dates, text and messages in a manner independent of natural languages.

This package contains important classes like DateFormat, DecimalFormat, NumberFormat, ParseException, etc.

You can find the java.text JavaDoc here

9. Javax XML Package (javax.xml.*)


javax.xml package provides classes allowing the communication and processing of XML documents.

This package is added to the JDK in version 1.5 and it contains classes like XMLConstants, etc.

You can find the javax.xml JavaDoc here

10. Javax Swing Package (javax.swing.*)


javax.swing package provides a set of "lightweight" components that almost work the same on all the platforms.

This package contains important classes like BoxLayout, ImageIcon, JButton, JCheckBox, JComponent, JFrame, JLabel, JList, JPanel, etc.

You can find the javax.swing JavaDoc here

List of All Java Packages and What they do?

You can find the list of all the Java Packages available in Java 17 and what they do here.

That's all for today, please mention in the comments in case you have any questions related to frequently used core java packages.

About The Author

Subham Mittal has worked in Oracle for 3 years.
Enjoyed this post? Never miss out on future posts by subscribing JavaHungry