this Archive

Constructor Chaining using this and super keyword

By default super class constructors are not inherited in subclass. Invoke super class constructor implicittly or explicitly by using super keyword. The first line of sub class constructor must be super. If it is not explicitly written, compoler will automatically put super keyword as a first statement in subclass to invoke super class no-argument constructor super keyword can be

this keyword in java

this keyword in java In this article we will learn about this keyword in java. By using this keyword, you can refer any member (hidden variables, data fields, constructors, methods) of the current object. A very genuine reason to use this keyword in java because a field is hidden or shadowed by the another constructor