Question: what is the difference between static and nonstatic?
Answer: A static method belongs to the class itself while a non-static method belongs to each instance of a class. Therefore, a static method can be called directly without creating any instance of the class and an object is needed to call a non-static method.