
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Introduction to the new approach of starting to learn programming of this course. Content of the course.
You download and install the Oracle Java JDK. Afterwards we will start JShell.
Some information regarding the Java version you have to use for this course. Please use Java >= 9!
We are doing some simple math.
First commands in JShell.
Introduction to variables.
Variables practically used.
Defining and using variables with text and logical values including the use of their operators.
The compound assignment operators save you some typing.
Only one input variable.
See compound and unary operators in action.
It's time for a small break and a summary of what we have learned.
Using flow charts to demonstrate the If-Statement.
We have If-Statements within JShell.
An If-Statement as an operator.
Let's compute a maximum with the ternary operator.
Description of the Switch-Statement and some words about the Break-Statement.
Always use break;
The While-Loop and the Do-While-Loop as flow chart and code and their differences.
The While-Loop with curly braces and without.
The Do-While-Loop with curly braces and without and the differences to the While-Loop.
What are Arrays?
There are two ways to define an array.
Writing to and reading from an array. The bounds of an array and the error messages you get.
Arrays in Arrays
Practical examples of arrays.
How the For-loop looks like in code and in a flow chart diagram.
Why programmers use the For-loop so often.
How to use the For-Loop together with an array or an iterator.
A relative to the For-Loop.
Diving into more features of the For-Loop
Have a look at an example of the For-Loop and the For-Each-Loop in JShell.
Basics about methods. How a method is declared and how it is invoked.
Let's create some methods and use them using JShell.
Normally there is a fixed number of parameters to a method. But it is possible to provide a variable number of parameters.
This course is intended for all students who are new in programming and want to learn a programming language from the scratch. No prior programming skills are needed to participate within the course. It is also interesting for non-programmers who want to get the first insights in what developers actually do in their daily work.
The course covers the basic concepts of variables, value assignments to variables, operators on variables and conditional statements like the if-statement or the while-loop. It does not cover object-oriented programming.
The course utilizes a new approach to learn the basic concepts of programming utilizing the Java language by using the shell which is included since Java 9 within the Java installation package which is called JShell. So, the as minimum Java 9 is needed for practical examples within the course but any other higher version of the Java Developer Kit (JDK) which is downable for free is also suitable.
The shell enables you to run small programs while you type. Each and every line of the program which is typed in is immediately executed. This release you from the burden to learn the write-compile-run loop at the beginning and gives you a quick start. Of course for more complex development task like object oriented programming this is needed and also the learning of an Integrated Development Environment (IDE) should be done. But these are more complex lectures which are excluded from the course by using the included shell JShell to give you a jump start.