What is the difference between JDK and JRE?

JRE – Java Runtime Environment:This is the set of everything necessary to run a compiled Java program. The environment consists of the Java Virtual Machine (JVM) itself, the Java Class Library, the java command-line tool, and other infrastructure. However, the JRE is not sufficient for creating new programs.

JDK – Java Development Kit: This is a comprehensive SDK for Java. The JDK includes the JRE but also contains additional development tools such as the (javac), javadoc and jdb.With the JDK, you can create and compile programs.

In most cases, if you only need to run Java programs, you would install the JRE. If you plan to program in Java, however, you would need the JDK instead.

Source
What is the difference between JDK and JRE?