Originally posted by Jacob Thomas:
Is it possible to extend a class which only has a no-arg constructor that's been declared private? ie
If you cannot, I believe the class has the same effect as being declared as final. java.lang.Math has a private constructor and the class is also declared as final. Is it necessary to declare a class as final once you have a private constructor. Please throw some light into this issue. Thank you.
There is no emoticon for what I am feeling!
There is no emoticon for what I am feeling!
Originally posted by Jacob Thomas:
Thanks very much for you reply Jeff. You said it's also possible to extend the class using outer class. Could you possibly demonstrate this with code? Thanks
There is no emoticon for what I am feeling!
private default constructor
Tony Morris
Java Q&A (FAQ, Trivia)
Originally posted by Tony Morris:
(or niladic as it is sometimes called) constructor
There is no emoticon for what I am feeling!
Originally posted by Jeff Albertson:
Niladic seems obscure: http://onelook.com/?w=niladic&ls=a
Tony Morris
Java Q&A (FAQ, Trivia)
Originally posted by Jeff Albertson:
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |