Raghavendra Desoju wrote:I am confused why code is throwing compiler error even though we're not making an object of child class (Platypus). Can someone clarify please?
Trying to collect the broken pieces of my life,in the process of making out a beautiful picture out of it.
Trying to collect the broken pieces of my life,in the process of making out a beautiful picture out of it.
Trying to collect the broken pieces of my life,in the process of making out a beautiful picture out of it.
Sachin Tripathi wrote:but was wondering whether Roel will Care to elaborate further by posting code snippets for what he explained in the last portion(problem ,compiler will face if it has to verify the statements)
Sachin Tripathi wrote:Can't we make a rule like this
"If you are not explicitly calling extended class's constructor,in the constructor of extending class or neither using "this()" to refer any other constructor which might has explicit call to super constructor(considering presence of several constructors ,so if in any constructor we call super class's constructor and refer that constructor by "this()",then again IT will work) (This explicit call , if it does exist in extending class's constructor, it should has an argument list same as the parameter list of super constructor)
Then you should always add a no argument constructor in super class"
Trying to collect the broken pieces of my life,in the process of making out a beautiful picture out of it.
Sachin Tripathi wrote:If other developers do that then it should have error in their respective code.Why is it showing while op is not creating any instance of Platypus
Trying to collect the broken pieces of my life,in the process of making out a beautiful picture out of it.
Trying to collect the broken pieces of my life,in the process of making out a beautiful picture out of it.