Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
In what instances you will declare a constructor to be private
In what instances you will declare a constructor to be private?
✍: Guest
When we create a private constructor, we can not create object of the class directly from a client. So you will use private constructors when you do not want instances of the class to be created by any external client. Example UTILITY functions in project will have no instance and be used with out creating instance, as creating instances of the class would be waste of memory.
2007-10-23, 5912👍, 0💬
Popular Posts:
If we inherit a class do the private variables also get inherited ? Yes, the variables are inherited...
What Is URI? URI (Uniform Resource Identifier) is a superset of URL. URI provides a simple and exten...
What is hashing? To hash means to grind up, and that's essentially what hashing is all about. The he...
What is more advisable to create a thread, by implementing a Runnable interface or by extending Thre...
What metrics will you look at in order to see the project is moving successfully? Most metric sets d...