what is the use of private constructor in core java?
Answer Posted / deep chandra harbola
private constructor are used to create Sinleton class.
example logger class
for singleton class only one object can be created.
by default member of singleton class are static.
singleton class can not be inherited.
Is This Answer Correct ? | 29 Yes | 3 No |
Post New Answer View All Answers
why are wait(), notify() and notifyall() methods defined in the object class? : Java thread
Can singleton class be cloned?
What exactly is a .class file?
State some advantages of java?
What does jre stand for?
What is return null in java?
Define linked list and its features with signature?
Which collection is thread safe in java?
What is the java project architecture?
Difference between abstract and concrete class ?
there are N number of matchboxes numbered 1...N.each matchbox contain various number of stick.Two player can alternatevely pick some amount of stick from the higest stick containing box . The player is condidered win if there is no stick after his move.Find the final move so that the move player win. Note:In case the number of stick is equal ,pick the stick from the higest numbered box.
What is unsigned char?
What is main method?
Why pass by reference is not possible in java?
Which is easier .net or java?