1. You need to install JDK since this is the compiler that will convert JAVA programs in machine language so your computer/machine can understand them.
2. The Java Development Kit (JDK) is a software development environment used for developing Java applications. It includes the Java Runtime Environment (JRE), an interpreter/loader (java), a compiler (javac), an archiver (jar), a documentation generator (javadoc) and other tools needed in Java development.
3. I would recommend you installing latest JDK version from the following link.
WINDOWS USERS: READ CAREFULLY:
If you have a Mac or a Linux machine, the command prompt/terminal already comes ready to be used. However, if you use a windows machine, please continue reading:
java -version
This command lists all the java version installed in your machine.
If there are multiple versions of JDK installed in your windows computer, you might encounter difficulty compiling and executing your program. In that case, you might need to set your JAVA_HOME environment variable to the newest JDK so the IDE knows which version of JDK to use.
The following video will give you some idea on how to set the java_home environment variable: https://www.youtube.com/watch?v=kzfBT294GXY