Java Programs
Run
sudo apt install default-jre
sudo apt install default-jdk
Check by running java -version
and javac -verison
Read only install Installing the Default JRE/JDK
Compile the program using javac <my_program.java>
.
A class will be created in the same directory. (It can be named as Program.class
)
Then run the program using java Program
.
SET PRESERVE INDENTATION TO OFF
DON'T DO IN RESIZED MODE