Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is the use of declaring constructor as private?

Answer Posted / ranganathkini

By making all the constructors of a class private, you can
also prevent other class from extending the class without
marking the class final.

Is This Answer Correct ?    9 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of the runtime class in java programming?

1117


These static constructors are correct ? class A { statc intA() { } static A(int x,int y) { } static A(int x) { } }

1135


What is difference between == equals () and compareto () method?

1097


Explain naming conventions for packages?

1089


What is the difference between a local variable and an instance variable?

1173


Are there structures in java?

1029


What do you know about the garbage collector?

1156


What are the basic concepts of OOPS in java?

1087


How do you trim a space in java?

1024


How to sort array of 0 and 1 in java?

1001


What is method overloading in JAVA? Why is it not present in C ?

1145


What is finalize() function in java?

1066


What is java object name?

1049


Where and how can you use a private constructor?

1043


How finally used under exception handling?

988