It is not recommended to invoke a ________of the same class from the constructor.
a. static method
b. final method
c. overridable method
d. synchronized method
Answers
Answered by
2
Hello Friend...
__________________
___________________
The answer of u r question is...
" synthesizer method recommended..."
Thank you...☺️☺️☺️☺️
__________________
___________________
The answer of u r question is...
" synthesizer method recommended..."
Thank you...☺️☺️☺️☺️
Answered by
0
It is not recommended to ‘invoke’ an overridable method of the ‘same class’ from the ‘constructor’.
Option: (c)
Explanation:
- The Constructors should not invoke overridable methods, either in direct form or in indirect form. If this rule is not followed then it will result in failure of the program.
- The ‘superclass constructor’ runs before the ‘subclass constructor’ and the ‘overriding method’ in the subclass will be invoked before the ‘subclass constructor’ has run.
- During initiating the subclass object it should also automatically execute one of the constructors of the superclass.
Learn more about constructor
When a compiler can automatically generate a constructor if it is not defined then why is it considered that writing constructors for a class is a good practice?
https://brainly.in/question/1367736
Write a java program using a constructor
https://brainly.in/question/6911346
Similar questions