why cant we call non static method from static method.
Basic oops concept doubt
hey @Sumant123
You cannot call non-static methods or access non-static fields from main
or any other static method, because non-static members belong to a class instance , not to the entire class.
static method can call directly to the another static method in the same class.you dont need to create object of class. if call the non static method then first create the object of the class and call the object.non static method.