I recently was pulled back into Java programming for academic purposes and I ran into something interesting during my first project.
I had to design a GUI for a storefront with buttons that did various tasks, and I noticed something weird was happening with my variables. Any CLASS VARIABLES that my buttons changed through their Actions did not need to be declared static, while any CLASS VARIABLES my main method touched had to be declared static.
Why is this? My Main Method and ActionListener Methods are all on the same level of execution. (they're all in the same class, none of them are embedded within each other)
I hope this question is not too obvious/dumb, I am trying to relearn as much about Java as possible.