How can we call a method from the class without creating the class Object? Can you explain me the what are the alternative ways to call methods without Object?
posted 9 years ago
If the method is "instance method" then it is tight to instances of the class, so you need an instance of the class to invoke such method.
If the method is "class method" i.e static, you can use the class name directly to invoke such method, you dont need an object of the class, but its still valid to call static methods on an object but then the compiler will substitute the class name.