Thursday, 3 March 2016

this Java keyword

A feature of Java that usually confuses beginners is the "this" prefix.

In a nutshell, the this keyword is used to distinguish between parameters of a method and attributes (instance variables) of a class.

The following link will lead you to a web page that does a great job contrasting and explaining this with examples:

No comments:

OOP Principles and UML

These are my favourite explanations (so far) regarding the principles of OOP: Abstraction, Encapsulation, Inheritance and Polymorphism. They...