Learn about the OOPs concept Encapsulation with some real world examples.
Encapsulation is the process of wrapping up data under a single unit
It is the ability of an object to hide its data and methods
Class helps us to encapsulate the fields which hold the state of object and methods which define the actions of the object
It is a protective shield that prevents the data from being accessed by the code outside the shield
Encapsulation can be achieved by declaring all variables in the class as private and writing public methods in the class to set and get the values of the variables
Found this video interesting - Please Like and Share the video.
Have Feedback/Questions - Leave a comment below.
Subscribe our YouTube Channel - / @qascript
Get access to 100 plus videos on different automation tools. Also never miss out on any new video posted on our channel.
Other Video Playlists on our Channel:
Postman:
• Mastering the Postman API Platform: Jenkin...…
Selenium:
• Selenium Webdriver Automation: From Basics...…
Rest Assured: • Introduction To Protractor Framework - Wha...
Cucumber: • Selenium Cucumber Framework - Introduction...
Protractor: • Introduction To Protractor Framework - Wha...
Jenkins 2.0:
• Jenkins 2.0 & DevOps: Mastering Continuou…
Maven:
• Mastering Maven and Continuous Integration...…
Blog Site: qascript.com/
コメント