output you can observe the following output when you execute the code given above helloworld note that in the above programwe defined method with self as argument but we cannot call the method as we have not declared any argument to it class myclass(object)def firstm(self)print("helloworld"print(selfobj myclass(obj firstm(print(objoutput you can observe the following output when you execute the code given abovehelloworld encapsulation encapsulation is one of the fundamentals of oop oop enables us to hide the complexity of the internal working of the object which is advantageous to the developer in the following wayssimplifies and makes it easy to understand to use an object without knowing the internals any change can be easily manageable object-oriented programming relies heavily on encapsulation the terms encapsulation and abstraction (also called data hidingare often used as synonyms they are nearly synonymousas abstraction is achieved through encapsulation encapsulation provides us the mechanism of restricting the access to some of the object' componentsthis means that the internal representation of an object can' be seen from outside of the object definition access to this data is typically achieved through special methodsgetters and setters