To write code in Java, you must first have the JDK and Java Development IDE installed on your computer.
JDK stands for Java Development Kit. JDK is required for writing, compiling and running a Java program. JDK includes:
Java code can be written in a simple text editor like Notepad. However, software programmers prefer to use IDE (Integrated Development Environment) such as Eclipse, Netbeans, IntelliJ IDEA, etc. The use of Java IDE makes the development of a Java program very easy. An IDE usually has a source code editor, build automation tools, and a debugger. Some IDEs, such as NetBeans and Eclipse, contain the necessary compiler, interpreter, or both.
Starting with Java 11, Oracle uses a new commercial license for Java. You may need to buy a license from Oracle if you want to use the official JDK in a commercial setting. Otherwise, you should use OpenJDK which is free to use. The difference between the Oracle JDK and OpenJDK is, the Oracle JDK is an optimized version of Java. Whereas, OpenJDK is an open-source and is not optimized.
There are many Java Development IDE but in this tutorial, we will use Eclipse. Eclipse IDE is used by professional developers. It provides a source code editor, build automation tools, a debugger and many other facilities which makes the software development process faster and easier.