indra negi wrote:I understood that for static methods we don't need an instance of the class however it can still be invoked with an instance of the class. And if it can then why non static classes cannot contain static methods.
If that allowed you are breaking a rule there (ability to invoke the static method without an instance).
Please explain me this and also the basic difference between invoking a static method with an instance and without an instance.
It's just the way you invoke the method. However it's not a good practice to use a reference to an instance to invoke static,
you should always try to use the classname/interfacename (for static variables).