Hello world in java

problem

You wish to get your hands dirty with the Java Programming language but you’re a first-timer (or second)

SOLUTION

Hello World is usually the first classic program we write when first interact with a new programming language.

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

Let’s compile it in the terminal:

				
					javac HelloWorld.java
				
			
execute it
				
					java HelloWorld
				
			
output
				
					Hello World
				
			

conclusion

In this post we saw a classic Hello World written in the Java programming language. One of the most widely used programming languages out there!

Share it!

Facebook
Twitter
LinkedIn
Reddit
Picture of Ellion

Ellion

Professional IT consultant, writer, programmer enthusiast interested in all sorts of coding.
Eats all cookies 🍪

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x