# FAQ

## 1. Why are some Java versions for example 8 also called 1.8? <a href="#why_are_some_java_versions_like_8_also_called_1_8" id="why_are_some_java_versions_like_8_also_called_1_8"></a>

Java versions before 9 had a different naming scheme. So, Java 8 can also be called *1.8*, Java 5 can be called *1.5* etc. With the switch to time-based releases with Java 9 the naming scheme also changed, and Java versions aren’t prefixed with 1.x anymore.

<figure><img src="/files/s2nkaEyVychhC0fckHiz" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="/files/OpLVPVU1wRQ8Tv1jWLnD" alt="" width="563"><figcaption></figcaption></figure>

## 2. How Java versions differs? Do we learn a specific one? <a href="#what_is_the_difference_between_the_java_versions_should_i_learn_a_specific_one" id="what_is_the_difference_between_the_java_versions_should_i_learn_a_specific_one"></a>

Considering a example of Python where there are breakages between releases, like say Python 2 to 3, Java is special here. Java in this regard is backwards compatible. This means that our Java 5 or 8 program is guaranteed to run with a Java 8-20 virtual machine with a few exceptions which can be ignored for now.

However, it does not work the other way around, say our program relies on Java 20 features, that are not available under a Java 8 JVM.

## 3. Does Oracle website offers both JREs and JDKs ?

Up until Java 8, the Oracle's website offered JREs and JDKs as separate downloads - even though the JDK also always included a JRE in a separate folder. With Java 9 that distinction was gone, and we are *always* downloading a JDK. The directory structure of JDKs also changed, with not having an explicit JRE folder anymore.

{% hint style="info" %}
*JRE* is needed for running Java programs. A JRE includes, among other things, the Java Virtual Machine (JVM) and the "java" command line tool.

To develop new Java programs, we need a JDK. A JDK includes *everything* the JRE has, as well as the compiler *javac* and a couple of other tools like *javadoc* (Java documentation generator) and *jdb* (Java Debugger).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.pranaypourkar.co.in/the-programmers-guide/java/java-features/faq.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
