Java Tutorials:The for loop

The for loop This loop is used if you know exactly how many times you want to perform a certain task. For example to print out the 2 times table…

Java Tutorials: If Statements

In this tutorial I will discuss if statements and how they can be used to implement decision making in your programs. First of all lets have a look at an example of…

HelloWorld.java

Introduction Welcome to the first of my introduction to Java tutorials. These tutorials are aimed at complete beginners to programming. Java is a good language to start with because its…

Java:The Pitfalls of Inheritance Part-2

Listing 3 A Simple inheritance model Following this example, we would do the following to create an instance of the Car object:

In this, the instance variable of the…

Java:The Pitfalls of Inheritance Part-1

In Object Oriented Programming, inheritance is a commonly used mechanism to model the relationship between two types. However, modelling such relationship without realizing the impact on the overall application may…