Look at the Java program above.
There are 2 functions:
Every Java program needs a main function. It drives the program.
Other functions are optional!
Take a moment to analyse the program. What questions do you have right now? Think about any unfamiliar vocabulary. Ask yourself Do I get what's going on?!
Don't panic if you are a beginner and nothing makes sense.
In this intro unit, you will need to figure out how to install the Java Development Kit (JDK) on your laptop.
Next, you need to install an IDE. This is a programming environment to write, compile and run code.
Some popular IDEs are:
Note: this course currently presents ideas using Eclipse.
Mosh can help you! Watch this video. Around the 1 minute 50 second mark he shares how to install JDK and IDE on a Mac...
Once you have installed an IDE, you need to figure out how to start a new Java project.
The following video will show you how to do it using Eclipse.
Once you have everything set up, code the program at the top of this page. Can you get it working?
Notice all of the annoying symbols that WE MUST USE in Java : , ; " { } ( ) etc
Java has rules about how to write code. You must follows these rules. This is known as SYNTAX.
If you make a mistake with syntax, your will get a SYNTAX ERROR. You will then need to try and fix the error...
When you have completed the task, share your work with someone. Discuss it. What doesn't make sense?
Make any notes in your notebook.