But then,I couldnt see any instantiation of class Vict in any outside classes..
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
SCJP 6 83%
Working on SCWCD/OCPJWCD
SCJP 5 ๑۩۞۩๑♥~~ My Life is My Creation ~~♥๑۩۞۩๑
Originally posted by Naveen Kumar G:
Does it mean that this call is made by the compiler in order to initialize the instance variables,if any, of the Vict class?
Yes, you can say this,
Also, regarding the modified code provided by Milan, will the compiler implicitly insert the code "super();" in both the constructors of the Vict class?
Yes, compiler implicitly calls to super class default constructor using super()
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
with constructors you can use private.
It is used for generally Singleton classes. This class should have
a static class which return the object of that class.
I like tacos! And this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|