Part 1

Getting started with programming


Log in to view the quiz

Modern programming is practically always done in an IDE (integrated development environment). An IDE contains a set of useful tools for the programmer. It does not create the program by itself, but it can give hints about common mistakes in the code, and help the programmer understand the structure of the program.

The IDE we use on this course is called NetBeans, and we use it with the Test My Code plugin.

To start the course you need (1) a account, which you can create at the top of this course material, (2) Java (Java JDK), and (3) Netbeans with TMC development environment (in the future TMC).

All of these can be installed with the following instructions. When following the instructions, select "MOOC" as your organization and "Java Programming I" as your course. Installation instructions for Java and NetBeans can be found here: Java and NetBeans installation guide

Once you have created the user account and installed Java and TMC, watch the video below. The video demonstrates what happens when 'Netbeans with TMC' is opened for the first time. We select the organization and course, and do the first programming exercise. In the video, the user selects the 2019 course, but you should remember to select Java Programming I as your course!

This is the first programming exercise of this course. In this exercise, you'll familiarize yourself with the development environment.


Programmers Write Source Code

Programming is designing and implementing software. The functionality is implemented based on the wishes and requirements of the users and the customers. Programs are typically implemented (i.e., written or "coded") in a programming language meant to be written and read by humans.

There are hundreds of programming languages out there, and this course focuses one of them. The language used in this course is Java, which is one of the most commonly-used programming languages in the world. Learning Java also makes it easier to pick up other programming languages.

Programming languages, such as Java, have many commands built-in that a programmer uses when developing software. This makes programming easier as you don't need to implement everything from scratch. For example, programming languages typically have built-in options available for different menus and views used for making graphical user interfaces. Indeed, a large part of programming is making use of available functions and tools in solving problems — this, however, requires programming experience, which you only gain by programming.

The "code" you write is called source code. Source code consists of statements and expressions, which are read line by line from top to bottom, and from left to right. For example, to print "Hello world", you can use the pre-defined Java command System.out.println(), to which you need to provide the text inside the parentheses that you'd like to be printed:

System.out.println("Hello World");

The above statement is pre-built into Java, and it's used for printing a string. The statement tells the computer to output the string that's been provided to it, placed between the quotation marks. The statement ends with a semicolon ;.

Java programs require a certain frame around the code to work. Don't worry if it appears intimidating, it'll become very familiar over this course. Although you might not be able to make sense of the surrounding frame of code, you could probably guess what this following program does based on the print statement described above.

You'll find the first quiz of the course below. You can answer the quizzes right here in the course material.


Log in to view the quiz

You have reached the end of this section! Continue to the next section:

Remember to check your points from the ball on the bottom-right corner of the material!