Python Get Stated

Install Java

Some machine eaither Windows or Mac might have Java installed on them.

To check if you have Java Installed on your Windows PC machine just click on Start Menu then search for Command Prompt (CMD) then paste the below command and then click enter

C:\Users\Your Name>java --version

If the Java was installed you will get something like the below output (depending on version):

java version "22.0.0" 2024-08-21 LTS
Java(TM) SE Runtime Environment 22.9 (build 22.0.0+13-LTS)
Java HotSpot(TM) 64-Bit Server VM 22.9 (build 22.0.0+13-LTS, mixed mode)

But if you don't have Java installed on your machine you can download and install it for free from this website Amazon

Note: our tutorial will focus on writing Java code in our Java editor. Hence you can write it on your Integrated Development Environment (IDE) of your choice like: VS Code, IntelliJ, Eclipse, Sublime. etc. Which use to build large collection of files.

Feel free to use our online Java EditorOr if you want to practive on your computer, you can watch our tutorial on how to download and install Java here:

Java Quickstart

Java is all about Class, every Java program must begin with class name, and that class name must match the file name.

Let's create a our first Java program, this will demonstrate how to do it in any local text editor like (VS Code).

Create a file class Main.java on your text editor and copy the below co to it then save.

public class Main {
  public static void main(String[] args) {
    System.out.println("Hello World");
  }
}

We will explained the above code in the next chapter, so don't worry about it.

We want you to focus on how to run the code for now.

Now that you save the code, then open the Terminal of the VS code or navigate where you save the file. And run the below command:

C:\Users\Your Name>javac Main.java

When you click enter the above command will compile the Java code and if there is no error you will be at another line. Now type the below command also to see the output.

C:\Users\Your Name>java Main

If everything goes well the output should be like the below:

Hello, World!

Kudos, you have written and executed your first Python program.

Codingkolejis' Python Editor

Our tutorial at codingkoleji.com will be using a "Try it Yourself" Editor, where you can write and run your Java code and see the result right there.

public class Main {
  public static void main(String[] args) {
    System.out.println("Hello World");
  }
}

Because this editor will be used in our entire tutorial, to show the concept of java