I\'m really confused with this! I have 2 classes, Club and Membership. In Membership I have the method, getMonth(), and in
Static method can be accessed using the class name. In the above code, you are trying to access getMonth() method with class name Membership (Membership.getMonth()). But the signature of the getMonth() is public int getMonth(){ ... }, Here this method doesn't contain any static keyword. Because of this you are getting "non-static method getMonth() cannot be referenced from a static context".
To solve this we should change public int getMonth() to public static int getMonth() or use the object which you created already for Membership class.
Hope this is helpful.