
Java is a popular programming language owned by oracle, created in ‘95. It is used for: mobile apps, desktop apps, games, web apps etc. You must be wondering, why use java? The main reason is because it works on different platforms (Linux, Mac, Windows etc.)
To get started with java, you need to install its packages. To check whether it is installed on your computer, you need to run the following command on your terminal.
java --version
If it installed, you will see your version. If not then you better find a tutorial on YouTube that will show you step by step on how to install it. To see if it is working try out this code below:
public class Main {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
Save the code in your IDE as “Main.java”. Open your terminal and find the directory where you saved your file and then type “javac Main.java”. Your code will be compiled and if there is no error, you will be on the next line where you will type “java Main” to run the file.