> For the complete documentation index, see [llms.txt](https://www.pranaypourkar.co.in/the-programmers-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.pranaypourkar.co.in/the-programmers-guide/java/java-features/faq.md). Agents can also search and read this documentation through its [MCP server](https://www.pranaypourkar.co.in/the-programmers-guide/~gitbook/mcp).

# 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="https://3632859567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPd6ktrA5pPLsZJktj2fm%2Fuploads%2Fgit-blob-d0bcb8c3ee936acd2afc7c27c50a2f0ffcec7a6f%2Fimage.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://3632859567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPd6ktrA5pPLsZJktj2fm%2Fuploads%2Fgit-blob-4bd33ac5a18f891e965536d00963ae3f525008f3%2Fimage.png?alt=media" 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
