In this article let’s learn how static and non-static methods are used in a program.Usually when we want to access class members we create the object of the class and then access through the object as reference.There is another way to do this without creating the object(accessing directly by class…