Massimo Caliman
by Massimo Caliman
1 min read

Categories

  • Java

If you want Java to become your main programming language, you should familiarize yourself with the following essential aspects, which are common to all object oriented programming languages:

Variables

Variables are the basis of any programming language. Variables have the following attributes: name, type, value, address, size, lifetime, visibility or scope.

Primitive types and reference types

Primitive types have different behaviour from reference types.

Parameter Passing

In Java there is only one mechanism for passing parameters, the pass by value, you will see that despite this apparent limitation reference types will actually allow you will in fact allow you to pass by reference.

Classes and Objects

In Java a class encapsulates a set of values or attributes and a set of operations, the definition of a class introduces the definition of a new data type and the instances of a class are the objects.

Inheritance

Inheritance allows the derivation of one class from another. The classes derived classes inherit attributes and methods from the class from which they are derived.

Interfaces and polymorphism

Interfaces comprise a set of prototypes of methods and different classes can implement the same interfaces. This facilitates polymorphism, you must understand how interfaces are used with abstract classes and inheritance to support polymorphism.

Exceptions

Exceptions are a clean and elegant mechanism for handling potential errors or better exceptions in the execution flow of an application.

Run-time types

The type of a data item can change during the execution flow of an application; this allows OOP languages to do some particularly interesting things.