So I just started coding a Java program I\'m writing and it\'s telling me that my global variables need to be static. I don\'t understand why it\'s telling me this because I
if you are using some property in a static method then the property should be static. I am guessing you are using these global variables within the main method thus java is throwing this error. If you want to still access a global variable then probably define a class that is initialized with these global variables and instantiate the same in your main function and u can use it.