In this article, we will discuss useful core Java packages that can be used in almost all Java applications. I took JDK 10 release as a reference to list important core java packages. I have been using these core Java packages in my day to day project work so I hope you guys find it useful.
The java.text package provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages.
List of Useful Core Java Packages
1. Java Lang Package
java.lang package provides classes that are fundamental to the design of the Java programming language.
- Check out Java Lang Package Tutorial, this tutorial will take you through all the methods available in java.lang package using a simple and practical example.
- Check out JavaDoc at https://docs.oracle.com/javase/10/docs/api/java/lang/package-summary.html
2. Java Util Package
java.util package contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).- Check out Java Util Package Tutorial, in this tutorial, we will learn important java.util package classes/interfaces and their methods with lots of examples.
- Check out JavaDoc at https://docs.oracle.com/javase/10/docs/api/java/util/package-summary.html
3. Java Time Package
Java 8 has introduced a new Date and Time API under java.time package. The java.time package provides API for dates, times, instants, and durations.- Check out Java Time Package Tutorial, this tutorial shows important commonly used Java date and time classes under java.time package.
- Check out Javadoc at https://docs.oracle.com/javase/10/docs/api/java/time/package-summary.html.
4. Java IO Package
Java.io package provides classes for system input and output through data streams, serialization, and the file system.- Check out Java IO Package Tutorial, this tutorial is prepared for the beginners to help them understand the basic functionality related to all the methods available in Java.io package.
- Check out Javadoc at https://docs.oracle.com/javase/10/docs/api/java/io/package-summary.html.
5. Java net Package
The package java.net contains classes and interfaces that provide a powerful infrastructure for networking in Java. The java.net package can be roughly divided into two sections: a low-level API and a high-level API. Low-level API has classes like InetAddress whereas high-level API has classes like URL, URI, URLConnection, and HttpURLConnection.- Check out Javadoc at https://docs.oracle.com/javase/10/docs/api/java/net/package-summary.html.
6. Java NIO Package
The java.nio.file package and its related package, java.nio.file.attribute, provide comprehensive support for file I/O and for accessing the default file system.
Java NIO (New IO) is an alternative IO API for Java (from Java 1.4), meaning alternative to the standard Java IO API’s. Java NIO offers a different way of working with IO than the standard IO API’s.
- Check out Java NIO Tutorial, this tutorial shows important classes with an example.
- Check out Javadoc at https://docs.oracle.com/javase/10/docs/api/java/nio/package-summary.html.
7. Java SQL Package
The java.sql package provides the API for accessing and processing data stored in a data source (usually a relational database) using the Java programming language. This API includes a framework whereby different drivers can be installed dynamically to access different data sources. Although the JDBC API is mainly geared to passing SQL statements to a database, it provides for reading and writing data from any data source with a tabular format.- Check out Java SQL Package Tutorial, In this tutorial, we will learn a few important interfaces and classes of a java.sql package with lots of examples.
- Check out Javadoc at https://docs.oracle.com/javase/10/docs/api/java.sql-summary.html.
8. Javax XML.* Package
Javax.xml.* packages provide classes allowing the processing and communication of XML documents.- Check out Javax.xml packages tutorial, this tutorial cum reference will take you through simple and practical methods available in various packages covering javax.xml.bind, javax.xml.parsers, javax.xml.soap, javax.xml.validation and javax.xml.xpath.
- Check out Javadoc at https://docs.oracle.com/javase/10/docs/api/java.xml-summary.html.
9. JavaFX.* Package
JavaFX is a GUI toolkit for Java (GUI is short for Graphical User Interface). JavaFX makes it easier to create desktop applications and games in Java.
Below are briefly overview of its related package:
Javadoc at https://docs.oracle.com/javase/10/docs/api/overview-summary.html.
- javafx.base - Defines the base APIs for the JavaFX UI toolkit, including APIs for bindings, properties, collections, and events.
- javafx.controls - Defines the UI controls, charts, and skins that are available for the JavaFX UI toolkit.
- javafx.fxml- Defines the FXML APIs for the JavaFX UI toolkit.
- javafx.graphics - Defines the core scenegraph APIs for the JavaFX UI toolkit (such as layout containers, application lifecycle, shapes, transformations, canvas, input, painting, image handling, and effects), as well as APIs for animation, css, concurrency, geometry, printing, and windowing.
- javafx.media - Defines APIs for playback of media and audio content, as part of the JavaFX UI toolkit, including MediaView and MediaPlayer.
- javafx.swing - Defines APIs for the JavaFX / Swing interop support included with the JavaFX UI toolkit, including SwingNode (for embedding Swing inside a JavaFX application) and JFXPanel (for embedding JavaFX inside a Swing application).
- javafx.web - Defines APIs for the WebView functionality contained within the JavaFX UI toolkit.
10. Javax swing Package
The javax.swing package provides classes for java swing API such as JButton, JTextField, JTextArea, JRadioButton, JCheckbox, JMenu, JColorChooser etc.- Checkout Java Swing Tutorial, In this Java Swing Tutorial, you will learn how to create graphical user interfaces (GUIs) for applications using the Swing components.
- Check out Javadoc https://docs.oracle.com/javase/10/docs/api/java.desktop-summary.html.
11. Java math Package
java.math package provides classes for performing arbitrary-precision integer arithmetic (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal).
- Check out Java math package tutorial, this tutorial shows important classes and it's methods with an example.
- Check out Javadoc https://docs.oracle.com/javase/10/docs/api/java/math/package-summary.html.
12. Java Security Package
The java.security package provides the classes and interfaces for the security framework.- Check out Javadoc at https://docs.oracle.com/javase/10/docs/api/java/security/package-summary.html.
13. Java text Package
- Check out Javadoc at https://docs.oracle.com/javase/10/docs/api/java/text/package-summary.html.
14. java.util.logging Package
This package provides the classes and interfaces of the Java platform's core logging facilities. The central goal of the logging APIs is to support maintaining and servicing software at customer sites.- Checkout Javadoc at https://docs.oracle.com/javase/10/docs/api/java/util/logging/package-summary.html.
Comments
Post a Comment
Leave Comment