- Collection Framework in JavaCollections Class in JavaList Interface in Java with ExamplesArrayList in JavaVector Class in JavaLinkedList in JavaQueue Interface In JavaPriorityQueue in JavaSet in JavaHashSet in JavaLinkedHashSet in JavaMap in the JavaHashMap in JavaHashtable in JavaLinkedHashMap in Java
Difference between JDK, JRE, and JVM
The minimum environment required for a java program to run is called JRE (Java Runtime Engine). JDK is the minimum environment required for development of Java Applications.
Java Runtime Engine (JRE)
It is an environment that is required for executing a java application. A very popular usage
of JRE is with a browser where it is available as a plugin to allow applet (client side
program) to execute. JRE is composed of following components:
- Interpreter: It understand binary java code (e.g.: java.exe).
- Tools: They provide various functionality such as security, core services, internationalization, RMI etc. (e.g.: keytool, rmiregistry, javacpl etc)
- Library: Java Application Programming Interface (rt.jar, jce.jar, jsse.jar etc.)
JRE cannot be used for development of Java application but it is used for executing them.
Java Development Kit (JDK)
It is an environment that is targeted for developers who desire to develop Java applications.
JDK is nothing but Java Standard Edition which is used for development of desktop, user interface, communication and applet types of applications. JDK is composed of following components:
- Compiler: It is used to compile java code to bytecode (e.g. Javac.exe).
- Interpreter: It processes bytecode to native code (e.g. java.exe).
- Tools: They provide functionality such as RMI, internationalization, core services, security.
- Library: Reusable pre-defined Java API (rt.jar, jce.jar, jsse.jar etc.).
JDK is a super set of JRE. JDK has all the components that JRE has plus it has a compiler.
JVM (Java Virtual Machine)
JVM (Java Virtual Machine) is a very important part of both JDK and JRE because it is contained or inbuilt in both. Whatever Java program you run using JRE or JDK goes into JVM and JVM is responsible for executing the java program line by line, hence it is also known as an interpreter.
Java applications are called WORA (Write Once Run Anywhere). This means a programmer can develop Java code on one system and can expect it to run on any other Java-enabled system without any adjustment. This is all possible because of JVM.