An insight about Java constructors…

Introduction

What you are reading is the second in a series of articles titled “Stranger things in Java” (find the first article here), inspired by the contents of my book “Java for Aliens”. These articles are dedicated to insights of the Java language. Deepening the topics we use every day, will allow us to master Java coding even in the strangest scenario.

In this post, we will explore some scenarios in which the use of a Java programming base concept, such as the constructor, can hide some pitfalls. In particular, after having clarified some fundamental definitions, we will explore the relationships between constructors and inheritance, constructors and polymorphism, and the hidden work of the compiler.

#java #tutorial #constructors #super keyword #this keyword #stranger things in java: constructors

Stranger Things in Java: Constructors
1.05 GEEK