Subclass constructor

The subclass construct method first must build the super-class (or if there’s more than one,  execute them from the highest level, one by one) and finally build himself.

public Class(){ super(); this(); }

What is overriding?

You can define different a method in a sub-class identical to one from the super-class. Then the object will execute the method according to his class . If doesn’t exits there, he will execute it from the super-class.

Method overloading

It’s having different methods with the same name but with different inputs parameters. And when you call them it will run the method that matches with the input parameters given.

What is an Object?

An Object is an operative and unique copy of a class.

It’s like a normal variable (int, byte, char), it has his own attributes that you can edit and also has his own methods. All the changes (from attributes or methods) are made to the specified object, not to the class).

What is a Class?

A class is nothing by itself. It’s only an explanation of a new thing, like in a dictionary every word has his own definition.

It’s a mold and from where you can make a new Object.

Create a website or blog at WordPress.com

Up ↑