Learn Java
Published in

Learn Java

Writing your first Java program

Part 2 of the series on how to program in Java (learn java).

In this article, we will start with creating our first program in Java. I assume that you have Java installed in your machine and set-up a text editor to code. If you have not done it yet and don’t know how to do it, refer this article.

Before we dive in all the explanation, here’s a view of how a typical java program looks like:

Now what all this random stuff like class and main here?

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store