Use static keyword for global variable declaration and try to access it from non static methods and static methods