Developing Java programs requires that the Java Development Kit (JDK) be installed on your machine, which can be found here:
Make sure you select the right version for your operating system (Linux/macOS/Windows)
While not required to develop Java programs, an integrated development environment (IDE) makes doing so a vastly more efficient process. Eclipse is considered to be the choice du jour of IDEs by many professional programmers.
To get started with Eclipse, you should install the "Eclipse IDE for Java Developers" which can be found here: http://www.eclipse.org/downloads/
You will discover, as you use different applications to edit your code on different machines, that tab characters in your code can often be a nuisance. To this end, it is highly recommended, once you get Eclipse installed, to do the following, which will force Eclipse to use spaces instead of tab characters when indenting:
For those interested, Jet.Brains provides an alternative integrated development environment to Eclipse, as mentioned above, found at the link below: