After reading various links on stackoverflow, I have this understanding:
Is this correct:
- Instance variables are initialized when the class is instantiated.
- If instance variables are declared only and not initialized, they will be assigned default values by JVM before constructor execution.
- If instance variables are declared with initialization, then these lines will be moved within every constructor of my class. And thus, execution will be done in constructor by compiler.
Thanks.