Whats Forward Reference?
I got an error
from the compiler stating "Illegal use of Forward Reference" when the declaration,
private String strName = "";
is placed below an instance initialization block, that initializes strName. If the block appears after the instance variable declaration, the compiler shows no error.
This has triggered some doubts. :roll:
Doubt#1: whether instance initialization blocks are executed at the class loading itself.
Doubt#2: this doesnt happen in case of constructors. The placing of constructors before the instnace variable declaration, doesnt throw any error.
Happy if u cud help,
Thank you in advance,