2
Reply

Can you make a constructor final in Java?

Sudhir Goswami

Sudhir Goswami

May 31, 2013
1.6k
0

    No we can't make constructor final

    Neha Kumari
    November 05, 2017
    0

    When you set a method as final, it means : "You don't want any class override it", but constructor by JLS definition can't overridden,so it is clean.When you set a method as 'abstract',it means:"Method don't have any body and you want another time implement it in child class", but constructor call implicitly when new keyword used so it can't haven't body.When you set a method as 'static', it means: "Method belong to class, not belong to object" but constructor implicitly called when construct time of class, so what it is static?

    Munesh Sharma
    April 15, 2014
    0