Chapter 4: JDKs and Libraries In Java

Chapter 4: JDKs and Libraries in Java

JDK stands for Java Development Kit. It is a set of packages and classes which contains basic "functions" like String functions, Math functions in java.

There is a concept of Packages in java. Just like a folder, a package can be used to store classes of the same type having different functions. 
Syntax for accessing a package in java: import <package1>.<package2>.<classname>;
Example: import java.io.DataInputStream;
This will import the DataInputStream class into your program for you to use. This means there is a default folder called java with a folder called io in it which contains i/o (input/output) related classes i.e. here DataInputStream
A dot "." is used to access folders/packages or classes inside a folder/package.
An "*" represents that all classes in the following package have to be imported.
A package is always imported before defining a class.



IN SCHOOLS WE USE JDK 1.5, LATEST JDK 18 HAS BEEN RELEASED IN 2022
In JDK 1.5, we have some major packages which are:
java.lang
java.io
java.util
java.text
java.applet
java.net
java.math
JavaDocs about this JDK 1.5 are listed on the official website:


Library in java refers to a set of packages and classes such that the Library performs different functions.
Java library performs various basic functions in java.

NOTE: YOU CAN ALWAYS REFER TO JAVA DOCS FOR MORE INFORMATION

Happy Learning! 👋

Comments

Post a Comment

Popular posts from this blog

Chapter 10: Divide and Conquer

Chapter 1: Introduction To Java

Resources