The very first program which any person would attempt when learning a programming language is to print “Hello World!”, today in this article you would learn how to print “Hello World!” in a simple Java Program.
// Importing default package
//code for writing a class.
public class HelloWorld
public static void main(String rs)
You could run the program by opening a command prompt and then navigate to the place where the program “HelloWorld.java” is stored and used commands to compile and run the Java program, you would see the following out put.
Output: On the console / command prompt.
If you are not aware of how to compile, run and even create a java file, please refer to Getting started with Java , Kindly share any of your queries in form of comments, we would be more than happy to help.