for a local variable :
i know that we need to initialize a local variable before using it
for static variable:
What does this error says ? variable 'j' should be initialized automatically as it is a static one, then why we get this error.
Why dont we get the same error for local variables. Why for local variable its says that it must be initialized before using instead of saying that we cannot use it before it is not defined ? At what stage a variable gets defined ? is it after completing the statement ?