The simplest program

Java Syntax
Level 3 , Lesson 1

"Hi, Diego!"

"Hi, Amigo!"

"The professor praised me recently. He was glad that I'm making such fast progress thanks to his lessons."

"You're making progress thanks to the professor's lessons?! Oh, sure! Doesn't he realize how funny that is?"

"Well, never mind. I have something interesting for you today. I'll teach you how to write the simplest (or minimal) program. It's very easy. A minimal program consists of one class and contains one method - main(). This is how it looks."

The simplest program
public class MainClass
    public static void main(String[] args)
        System.out.println("Kiss my shiny metal rear actuator!");

"I've seen that before, so I get it."

"Of course, nobody needs programs like that. The more complicated the problem solved by a program, the cooler the program is. That's why programs normally consist of thousands of classes."

"An average program is written by a team of ten people over 2-3 years."

"What would be considered a big program, then?"

"Maybe a program that takes a team of 100 people 5 years to write."

"500+ human-years? Oh, wow!"

"Yes. Java is one of the best programming languages for writing big and very big programs."

"I'm scared to ask what constitutes a 'very big' program."

"Good for you! You catch on fast."

"Programmers quickly realized that it's difficult to navigate through thousands of classes. They came up with special programs that accelerate the process of writing programs manifold. The bigger the program you're writing, the clearer the benefits."

"So programmers came up with a program for writing programs?"

"Yes. Why are you surprised? A program is above all a tool for automating routine tasks. When you've written code for a couple of years, you'll find there are a huge number of such tasks."

"A program for creating programs is called an Integrated Development Environment (IDE).

Today, you'll see one of them.

No, today you'll see the best of them! It's called IntelliJ IDEA, and it will become your faithful friend for many years ahead. It's like a more experienced companion who always provides hints and help."

"Now that's intriguing!"

"If you aren't going to write programs in Word, then you'll need a good development environment, right? We robots prefer the IntelliJ IDEA Community Edition. Download and install the latest version."

Hint 1
How to find IntelliJ IDEA on Google

Hint 2
Download page for IntelliJ IDEA

"You'll also have to install a Java development kit (JDK). A JDK is a kit for Java developers, created by the founders of the Java platform. It includes a Java virtual machine, Java compiler, and much more that an experienced Java developer might need."

"What's wrong with how I've been writing programs – through the website?"

"That's convenient for small programs, but it's better to write big ones in IntelliJ IDEA. We're preparing you to become a professional programmer, so the faster you master these cool tools, the better. Don't be afraid. This program was created to make your life easier, not more difficult. You'll get used to it quickly. Soon you won't want to touch anything else."

"To learn how to write programs, you need to write programs. For that, install IntelliJ IDEA and a JDK on your computer. Download and install OpenJDK 15."

Hint 1
First of all, visit this page: https://jdk.java.net/15/

It should look something like this:

In the Builds section, click on the version for your OS in order to start the download process.

Unpack the downloaded archive. We suggest you save the unpacked project folder to a safe destination, to avoid accidental removal.

"Let's reinforce the theory with an exercise."

In case you face any issues with the JDK installation, do not hesitate to contact our support team by e-mail support@codegym.cc or using chat widget in the lower right corner of the page.

Java Syntax, level 3, lesson 1
Dividing is good
As a well-known paramecium once said, "dividing is good". Higher lifeforms (though not all) are united by this wisdom, including the highest form of life: programmers. Let's write a method to divide one number by another. We'll call it div, and we'll display the result of the division.
Comments (121)
Ernestas Salna Level 3, Vilnius, Lithuania
7 March 2021
I'm using NetBeans, because I started a coding bootcamp with it. Is there a good reason why I should swap to intelliJ IDEA?
Elif Yildiz Level 4, Newark, United States
16 January 2021
I have a Chromebook for now because I cannot effort to buy a new laptop. Unfortunately, it says that Chromebook doesn't support intelliJ IDEA. What can do?
envy Level 6, Detroit, United States
15 January 2021
I have a 32 bit OS and I am trying to see if there is a jdk 14 available for a 32 bit version I can acquire ? How do I proceed?
Cassie Butler Level 3, Seattle, United States
23 December 2020
At no point do these instructions direct you to the Downloads folder within CodeGym to obtain the CodeGymProjects folder. I had to dig through the comments in the next lesson to find that out. Incredibly frustrating user experience and lost half a day I could have been learning. To save the rest of you some time: https://codegym.cc/me/downloads
Ajani Level 8, Jacksonville, United States
2 November 2020
does it need to be jdk14? the website now says that particular IDE has been superseded by their latest version jdk15.
mastere Level 9, Rochester, United States
29 September 2020
I forget the ; semi-colon so much of the time on here. I end up repeating these tasks several times for such simple mistakes.
ashleybee19 Level 8, Seattle, United States
13 September 2020
IntelliJ is awesome! It makes writing programs so much easier.
Gigi Suchan Level 3, Los Angeles, United States
16 August 2020
It would be nice if you guys actually taught this task before giving this task.
4 August 2020
i don't have pc. what's the option for android?
Matt Level 3, Houston, United States
1 August 2020
This is more than I got from my college class in Java