Pages

Friday, September 6, 2019

Create simple java program | simple java program in notepad

Step:1-First we are create one class helloworld.

class helloworld {
     //program main  herepart !
}

Step:2-create main method in class helloworld.

public static void main(String[] args) {
        //main method..
    }

  • After create main method write your code in above method.
  • save your file with same name of class name and .java extension.

helloworld.java

class helloworld {

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

Output:

Create simple java program | simple java program in notepad

Share:

0 Comments:

Post a Comment