top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

Why utility class should be final and should have private constructor in Java?

0 votes

By making private constructor, we can avoid instantiating class from anywhere outside and by making class final, no other class can extend it. Why is it necessary for Util class to have private constructor and final class ?

posted Sep 3, 2015 by Ritika

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.