Print hello world during run time

02:43 Unknown 0 Comments

below provide detailed instructions for compiling and running a simple "Hello World!" program during run time. First open notepad and write program, for compiling and running you can use cmd….

//program to print hello world


class Hello{

                public static void main(String args[]){

                                System.out.println(args[0]+args[1]);

                }
}



Save Program, program name.java
Helloworld.java     // program name always should main class name
For compile
Javac Helloworld.java
For run:
Java Helloworld  hello  world


Output:


0 comments:

e gift