Non-static method (method name()) cannot be referenced from a static context. Why?
问题 I'm really confused with this! I have 2 classes, Club and Membership . In Membership I have the method, getMonth() , and in Club I have joinedMonth() which takes the parameter, 'month' - so a user enters a month and then I want it to return the Membership's which joined in that specific month. I am trying to call the getMonth() method from class Club, so that I can then go on to compare the integers of the months. But, when I try to call the method, I just get the mentioned "non-static method