eko

eko

  • NA
  • 25
  • 0

Static method doesn't allow me to access a global variable?

Sep 12 2009 9:58 AM
I can't access the abc variable from static metod which is defined below. why it is not allowed to this? class sample { int abc = 1; void foo1() { abc // accessible } static void foo2() { abc // why not accessible? } }

Answers (1)