Java t1

Shubham GordeShubham Gorde
1 min read

Today I am going to show to java basic syntax and how it works


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

So this is a basic syntax of java where the first world is public means it is pubilc so anyone can access it from anywhere

Then second is class In Java, a class is a blueprint or template for creating objects. It defines the characteristics and behaviors that objects of that class will have.

Then our ClassName It can be anything

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

Then our main method which is compiled by the computer means computer only runs the this main method means whatever you want to run you have to add that in main method then you will see expected output.

0
Subscribe to my newsletter

Read articles from Shubham Gorde directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Shubham Gorde
Shubham Gorde