Sudhir Goswami
Can you make a constructor final in Java?
By Sudhir Goswami in Java on May 31 2013
  • Gude VenkataRao
    Sep, 2018 3

    Yes, if you make constructor as final we cannot create an instance of that class from anywhere

    • 0
  • Neha Kumari
    Nov, 2017 5

    No we can't make constructor final

    • 0
  • Munesh Sharma
    Apr, 2014 15

    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?

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS