Why non-constant static variables need to be initialized outside the class? – stackoverflow.com

I know that non-constant static variables need to be initialized outside the class definition but, is there a reason for this? class A { static int x = 0 // compile error; static int y; }; ...

from Hot Questions - Stack Exchange OnStackOverflow
via Blogspot

Share this

Artikel Terkait

0 Comment to "Why non-constant static variables need to be initialized outside the class? – stackoverflow.com"