How to program in Java?

Step by step instructions of how to program in java

Now you can create a java program and save it as any_name.java.

To compile a java program,go to command prompt , point to the folder where the java program file (.java) exists eg. cd Folder_Name and compile it using the command

javac Filename.java
A class file(.class) with the same name will be generated in the program folder if no error occurs.

To run the java program type

java Filename
in command prompt after class file is generated successfully.

To write your Java programs, you can use a text editor. Below are popular text editors, you can consider any one ,


What is JDK, JRE and JVM ?