0
Can Constructor use both final and this keyword?
2 Antworten
+ 1
A constructor cannot be made final in Java since it is not subject to inheritance unlike methods. But yes you can use the this keyword inside constructor to initialize instance variables. The this keyword is a pointer to the current instance of the class.
0
inside constructor, you can use both.