We start out by downloading a JDK and setting up our environment before beginning our journey into Java5. With the environment set up we introduce the code structure of a Java source file and look at syntax. After this we look at the primitive variables available in Java before discussing method scope. We then take an in-depth look at the symbols used for mathematical and logical manipulation that are recognised by the compiler and commonly known as operators. Every computer language has conditional branching and loop structures and Java is no exception. We finish off this section with a look at the conditional and loop statements available in Java5.
In our first lesson on Java5 we download the latest JDK from the Oracle site and setup our environment. We then check that everything is working correctly and our environment is set up by running a check to see if the Java compiler can be accessed from the command line.
Now we have the basic environment set up we can take a look at the code structure of a Java source file and look at some syntax. In this lesson we do this, we then look at how to run our own programs/applications and finish the lesson by running our very first Java program.
Java comes with two types of variables to choose from, primitives and reference. In this lesson we look at the various primitive data type variables that are available in Java, what we can store in each primitive type and when and how to use them.
Symbols used for mathematical and logical manipulation that are recognised by the compiler are commonly known as operators in Java. In the first of two lessons on operators we look at the arithmetic, relational, logical and assignment operators.
In the second lesson on operators we look at the bitwise logical and bitwise shift operators. Bitwise operators perform their operations on the integer types
long and will not work with any other type. These operators are used to manipulate the bits within an integer value, hence the name.
In this lesson we look at the conditional statements available in Java. Conditional statements allow us to evaluate an expression and execute some code dependent upon the outcome. There are two conditional statements we
can use with Java, the
if statement and the
switch statement; the choice of which to use really depends on the
expression being evaluated.
In this lesson we look at the loop statements available in Java. Loop statements allow us to iterate over some code multiple times. There are two loop statements in Java, the
for statement and the
while statement and the various forms of each are covered here.