Hi could someone please explain to me why you have to create an instance before calling a non static method to the main function in java? What is the reasoning behind this?<
All the Static things of a class always belongs to a class and they are treated as a properties of the class .That's why they can be called by their name in that class, and called outside the class with the class name.
All the Non-Static things of a class always belongs to an object, they are always treated as properties of an object. That's why they can only be called after creating an object by a (.) dot operator.