You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The this() constructor call should be used to reuse the constructor in the constructor. It maintains the chain between the constructors i.e. it is used for constructor chaining.
*/
class This3
{
int id;
String name;
String city ;
This3(int id ,String name){
this.id=id;
this.name=name;
}
This3(int id, String name, String city){
this(id,name); //Rule: Call to this() must be the first statement in constructor.