{"id":3373,"date":"2024-11-15T16:08:54","date_gmt":"2024-11-15T16:08:54","guid":{"rendered":"https:\/\/sankhamtech.com\/index.php\/content\/india\/english\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-encapsulation-in-java\/"},"modified":"2024-11-15T16:09:34","modified_gmt":"2024-11-15T16:09:34","slug":"understanding-encapsulation-in-java","status":"publish","type":"page","link":"https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-encapsulation-in-java\/","title":{"rendered":"Understanding Encapsulation in Java"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"3373\" class=\"elementor elementor-3373\">\n\t\t\t\t<div class=\"elementor-element elementor-element-74c77dd e-flex e-con-boxed e-con e-parent\" data-id=\"74c77dd\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t<div class=\"elementor-element elementor-element-4e3bc89 e-con-full e-flex e-con e-child\" data-id=\"4e3bc89\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-e5c575b elementor-hidden-mobile elementor-widget elementor-widget-text-editor\" data-id=\"e5c575b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h6 style=\"text-align: center;\"><span style=\"text-decoration: underline;\">Lessons<\/span><\/h6>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1264417 elementor-hidden-desktop elementor-hidden-tablet elementor-widget elementor-widget-text-editor\" data-id=\"1264417\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h6 style=\"text-align: center;\"><a href=\"https:\/\/sankhamtech.com\/index.php\/content\/india\/english\/home\/free-courses\/understanding-object-oriented-programming-in-java\/\"><span style=\"text-decoration: underline;\">Lessons<\/span><\/a><\/h6>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4793756 elementor-hidden-mobile elementor-widget elementor-widget-darsanam_header_menu_widget\" data-id=\"4793756\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"darsanam_header_menu_widget.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"darsanam-menu-wrapper \"><div class='hamburger-icon'><i class=\"fas fa-grip-lines\"><\/i> &nbsp; <\/div><div class=\"menu-container\"><nav class='elementor-menu'><ul class='darsanam-menu-vertical'><li class='darsanam-menu-item'><a href='https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/setting-up-your-development-environment\/'>Setting Up Your Development Environment<\/a><i class=\"menu-icon-right fas fa-angle-right\"><\/i><\/li><li class='darsanam-menu-item'><a href='https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/java-basics-syntax-variables-data-types-and-operators\/'>Java Basics - Syntax, Variables, Data Types, and Operators<\/a><i class=\"menu-icon-right fas fa-angle-right\"><\/i><\/li><li class='darsanam-menu-item'><a href='https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-objects-and-classes-in-java\/'>Understanding Objects and Classes in Java<\/a><i class=\"menu-icon-right fas fa-angle-right\"><\/i><\/li><li class='darsanam-menu-item'><a href='https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-encapsulation-in-java\/' style='color: #FF7700 !important'>Understanding Encapsulation in Java<\/a><i class=\"menu-icon-right fas fa-angle-right\"><\/i><\/li><li class='darsanam-menu-item'><a href='https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-inheritance-in-java-the-is-a-relationship\/'>Understanding Inheritance in Java: The \"Is-A\" Relationship<\/a><i class=\"menu-icon-right fas fa-angle-right\"><\/i><\/li><li class='darsanam-menu-item'><a href='https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-constructors-in-java-inheritance\/'>Understanding Constructors in Java Inheritance<\/a><i class=\"menu-icon-right fas fa-angle-right\"><\/i><\/li><li class='darsanam-menu-item'><a href='https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-access-modifiers-in-java-inheritance\/'>Understanding Access Modifiers in Java Inheritance<\/a><i class=\"menu-icon-right fas fa-angle-right\"><\/i><\/li><li class='darsanam-menu-item'><a href='https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-polymorphism-in-java\/'>Understanding Polymorphism in Java<\/a><i class=\"menu-icon-right fas fa-angle-right\"><\/i><\/li><li class='darsanam-menu-item'><a href='https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-abstract-classes-and-methods-in-java\/'>Understanding Abstract Classes and Methods in Java<\/a><i class=\"menu-icon-right fas fa-angle-right\"><\/i><\/li><li class='darsanam-menu-item'><a href='https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-interfaces-in-java\/'>Understanding Interfaces in Java<\/a><i class=\"menu-icon-right fas fa-angle-right\"><\/i><\/li><li class='darsanam-menu-item'><a href='https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-exception-handling-in-java\/'>Understanding Exception Handling in Java<\/a><i class=\"menu-icon-right fas fa-angle-right\"><\/i><\/li><li class='darsanam-menu-item'><a href='https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/java-collections-framework-list-set-map-and-their-implementations\/'>Java Collections Framework - List, Set, Map, and their implementations<\/a><i class=\"menu-icon-right fas fa-angle-right\"><\/i><\/li><li class='darsanam-menu-item'><a href='https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-loops-in-java-foreach-and-lambda\/'>Understanding Loops in Java: forEach and lambda<\/a><i class=\"menu-icon-right fas fa-angle-right\"><\/i><\/li><li class='darsanam-menu-item'><a href='https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-the-serializable-interface-in-java\/'>Understanding the Serializable Interface in Java<\/a><i class=\"menu-icon-right fas fa-angle-right\"><\/i><\/li><li class='darsanam-menu-item'><a href='https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-java-beans\/'>Understanding Java Beans<\/a><i class=\"menu-icon-right fas fa-angle-right\"><\/i><\/li><li class='darsanam-menu-item'><a href='https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/making-api-calls-in-java-a-comprehensive-guide\/'>Making API Calls in Java: A Comprehensive Guide<\/a><i class=\"menu-icon-right fas fa-angle-right\"><\/i><\/li><\/ul><\/nav><\/div><\/div>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-ab839df e-con-full e-flex e-con e-child\" data-id=\"ab839df\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-16f1fbf elementor-widget elementor-widget-text-editor\" data-id=\"16f1fbf\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h2>Understanding Encapsulation in Java<\/h2><p><\/p><p><\/p><h4 class=\"wp-block-heading\"><\/h4><h4 class=\"wp-block-heading\"><strong>The Concept of Encapsulation:<\/strong><\/h4><h4 class=\"wp-block-heading\"> <\/h4><p>Encapsulation is a fundamental concept in object-oriented programming (OOP), especially in Java. It involves bundling data (variables) and methods (functions) that operate on this data within a single unit, typically a class. The essence of encapsulation is to hide the internal state and functionality of an object from the outside world. This not only helps in safeguarding the data but also enhances the modularity and maintainability of the code.<\/p><h4 class=\"wp-block-heading\"> <\/h4><h4 class=\"wp-block-heading\"><strong>Example of Encapsulation<\/strong><\/h4><h4 class=\"wp-block-heading\"> <\/h4><p>Consider a scenario where you need to write a segment of code that includes two variables, <code>a<\/code> and <code>b<\/code>, and performs arithmetic operations like addition, subtraction, etc. Encapsulation can be achieved by wrapping this code in a class, say <code>ApplyOperators<\/code>. This class becomes the single unit through which operations such as setting the variables and executing arithmetic operations are performed.<\/p><h4 class=\"wp-block-heading\"> <\/h4><h4 class=\"wp-block-heading\"><strong>Code Example Demonstrating Encapsulation<\/strong><\/h4><h4 class=\"wp-block-heading\"> <\/h4><p>Here&#8217;s how you might implement this in Java:<\/p><h4 class=\"wp-block-heading\"> <\/h4><pre class=\"wp-block-code\"><code>public class ApplyOperators {\n    private int a;\n    private int b;\n\n    \/\/ Constructor to initialize variables\n    public ApplyOperators(int a, int b) {\n        this.a = a;\n        this.b = b;\n    }\n\n    \/\/ Method to perform addition\n    public int add() {\n        return a + b;\n    }\n\n    \/\/ Method to perform subtraction\n    public int subtract() {\n        return a - b;\n    }\n\n    \/\/ ... other arithmetic operations\n}\n<\/code><\/pre><h4 class=\"wp-block-heading\"> <\/h4><p>In this code, <code>ApplyOperators<\/code> encapsulates the variables <code>a<\/code> and <code>b<\/code> and the methods to perform arithmetic operations. The variables are marked as <code>private<\/code>, meaning they cannot be accessed directly from outside the class. This ensures that the class has complete control over how these variables are accessed and modified.<\/p><h4 class=\"wp-block-heading\"> <\/h4><h4 class=\"wp-block-heading\"><strong>Introduction to Access Modifiers<\/strong><\/h4><h4 class=\"wp-block-heading\"> <\/h4><p>Access modifiers in Java dictate the accessibility of classes, methods, and other members. The most common access modifiers are:<\/p><h4 class=\"wp-block-heading\"> <\/h4><ul class=\"wp-block-list\"><li><code>private<\/code>: The member is accessible only within its own class.<\/li> <li><code>public<\/code>: The member is accessible from any other class.<\/li> <li><code>protected<\/code>: The member is accessible within its own package and by subclasses.<\/li><\/ul><h4 class=\"wp-block-heading\"> <\/h4><h4 class=\"wp-block-heading\"><strong>Implementing Access Modifiers in the Example<\/strong><\/h4><h4 class=\"wp-block-heading\"> <\/h4><p>In the <code>ApplyOperators<\/code> class example, the variables <code>a<\/code> and <code>b<\/code> are marked as <code>private<\/code>. This means they cannot be accessed directly from outside the class, which is a key aspect of encapsulation. The methods <code>add<\/code> and <code>subtract<\/code> are marked as <code>public<\/code>, allowing them to be called from other classes.<\/p><h4 class=\"wp-block-heading\"> <\/h4><h4 class=\"wp-block-heading\">Testing the Class from the Main Method<\/h4><h4 class=\"wp-block-heading\"> <\/h4><p>Finally, to test our <code>ApplyOperators<\/code> class, we can create an object of this class in the <code>main<\/code> method and call its public methods:<\/p><h4 class=\"wp-block-heading\"> <\/h4><pre class=\"wp-block-code\"><code>public class Main {\n    public static void main(String[] args) {\n        ApplyOperators op = new ApplyOperators(10, 5);\n        System.out.println(\"Addition: \" + op.add());\n        System.out.println(\"Subtraction: \" + op.subtract());\n    }\n}\n<\/code><\/pre><h4 class=\"wp-block-heading\"> <\/h4><p>In this <code>main<\/code> method, we instantiate the <code>ApplyOperators<\/code> class and then call its <code>add<\/code> and <code>subtract<\/code> methods. The outputs will be the results of the arithmetic operations on the numbers 10 and 5.<\/p><h4 class=\"wp-block-heading\"> <\/h4><p><strong>Conclusion:<\/strong> This example illustrates how encapsulation is implemented in Java. By using access modifiers, we control the visibility and accessibility of the class members, thereby enforcing encapsulation. The <code>ApplyOperators<\/code> class serves as a real-world example of how encapsulation helps in creating a well-structured and maintainable code.<\/p><h4 class=\"wp-block-heading\"><\/h4><p><\/p><p><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Lessons Lessons &nbsp; Setting Up Your Development Environment Java Basics &#8211; Syntax, Variables, Data Types, and Operators Understanding Objects and Classes in Java Understanding Encapsulation in Java Understanding Encapsulation in Java<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3335,"menu_order":3,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-3373","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Understanding Encapsulation in Java - Sankham Technologies<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-encapsulation-in-java\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Understanding Encapsulation in Java - Sankham Technologies\" \/>\n<meta property=\"og:description\" content=\"Lessons Lessons &nbsp; Setting Up Your Development Environment Java Basics &#8211; Syntax, Variables, Data Types, and Operators Understanding Objects and Classes in Java Understanding Encapsulation in Java Understanding Encapsulation in Java\" \/>\n<meta property=\"og:url\" content=\"https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-encapsulation-in-java\/\" \/>\n<meta property=\"og:site_name\" content=\"Sankham Technologies\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-15T16:09:34+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/sankhamtech.com\\\/index.php\\\/content\\\/in\\\/en\\\/home\\\/free-courses\\\/understanding-object-oriented-programming-in-java\\\/understanding-encapsulation-in-java\\\/\",\"url\":\"https:\\\/\\\/sankhamtech.com\\\/index.php\\\/content\\\/in\\\/en\\\/home\\\/free-courses\\\/understanding-object-oriented-programming-in-java\\\/understanding-encapsulation-in-java\\\/\",\"name\":\"Understanding Encapsulation in Java - Sankham Technologies\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/sankhamtech.com\\\/#website\"},\"datePublished\":\"2024-11-15T16:08:54+00:00\",\"dateModified\":\"2024-11-15T16:09:34+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/sankhamtech.com\\\/index.php\\\/content\\\/in\\\/en\\\/home\\\/free-courses\\\/understanding-object-oriented-programming-in-java\\\/understanding-encapsulation-in-java\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/sankhamtech.com\\\/index.php\\\/content\\\/in\\\/en\\\/home\\\/free-courses\\\/understanding-object-oriented-programming-in-java\\\/understanding-encapsulation-in-java\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/sankhamtech.com\\\/index.php\\\/content\\\/in\\\/en\\\/home\\\/free-courses\\\/understanding-object-oriented-programming-in-java\\\/understanding-encapsulation-in-java\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/sankhamtech.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Content\",\"item\":\"https:\\\/\\\/sankhamtech.com\\\/index.php\\\/content\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"India\",\"item\":\"https:\\\/\\\/sankhamtech.com\\\/index.php\\\/content\\\/in\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"English\",\"item\":\"https:\\\/\\\/sankhamtech.com\\\/index.php\\\/content\\\/in\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Home\",\"item\":\"https:\\\/\\\/sankhamtech.com\\\/\"},{\"@type\":\"ListItem\",\"position\":6,\"name\":\"Free Courses\",\"item\":\"https:\\\/\\\/sankhamtech.com\\\/index.php\\\/content\\\/in\\\/en\\\/home\\\/free-courses\\\/\"},{\"@type\":\"ListItem\",\"position\":7,\"name\":\"Understanding Object-Oriented Programming in Java\",\"item\":\"https:\\\/\\\/sankhamtech.com\\\/indexphp\\\/content\\\/in\\\/en\\\/home\\\/free-courses\\\/understanding-object-oriented-programming-in-java\\\/\"},{\"@type\":\"ListItem\",\"position\":8,\"name\":\"Understanding Encapsulation in Java\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/sankhamtech.com\\\/#website\",\"url\":\"https:\\\/\\\/sankhamtech.com\\\/\",\"name\":\"Sankham Technologies\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/sankhamtech.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/sankhamtech.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/sankhamtech.com\\\/#organization\",\"name\":\"Sankham Technologies\",\"url\":\"https:\\\/\\\/sankhamtech.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/sankhamtech.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/sankhamtech.com\\\/wp-content\\\/uploads\\\/2023\\\/12\\\/Logo-Dark-1.png\",\"contentUrl\":\"https:\\\/\\\/sankhamtech.com\\\/wp-content\\\/uploads\\\/2023\\\/12\\\/Logo-Dark-1.png\",\"width\":306,\"height\":74,\"caption\":\"Sankham Technologies\"},\"image\":{\"@id\":\"https:\\\/\\\/sankhamtech.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Understanding Encapsulation in Java - Sankham Technologies","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-encapsulation-in-java\/","og_locale":"en_US","og_type":"article","og_title":"Understanding Encapsulation in Java - Sankham Technologies","og_description":"Lessons Lessons &nbsp; Setting Up Your Development Environment Java Basics &#8211; Syntax, Variables, Data Types, and Operators Understanding Objects and Classes in Java Understanding Encapsulation in Java Understanding Encapsulation in Java","og_url":"https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-encapsulation-in-java\/","og_site_name":"Sankham Technologies","article_modified_time":"2024-11-15T16:09:34+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-encapsulation-in-java\/","url":"https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-encapsulation-in-java\/","name":"Understanding Encapsulation in Java - Sankham Technologies","isPartOf":{"@id":"https:\/\/sankhamtech.com\/#website"},"datePublished":"2024-11-15T16:08:54+00:00","dateModified":"2024-11-15T16:09:34+00:00","breadcrumb":{"@id":"https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-encapsulation-in-java\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-encapsulation-in-java\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-encapsulation-in-java\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/sankhamtech.com\/"},{"@type":"ListItem","position":2,"name":"Content","item":"https:\/\/sankhamtech.com\/index.php\/content\/"},{"@type":"ListItem","position":3,"name":"India","item":"https:\/\/sankhamtech.com\/index.php\/content\/in\/"},{"@type":"ListItem","position":4,"name":"English","item":"https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/"},{"@type":"ListItem","position":5,"name":"Home","item":"https:\/\/sankhamtech.com\/"},{"@type":"ListItem","position":6,"name":"Free Courses","item":"https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/"},{"@type":"ListItem","position":7,"name":"Understanding Object-Oriented Programming in Java","item":"https:\/\/sankhamtech.com\/indexphp\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/"},{"@type":"ListItem","position":8,"name":"Understanding Encapsulation in Java"}]},{"@type":"WebSite","@id":"https:\/\/sankhamtech.com\/#website","url":"https:\/\/sankhamtech.com\/","name":"Sankham Technologies","description":"","publisher":{"@id":"https:\/\/sankhamtech.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/sankhamtech.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/sankhamtech.com\/#organization","name":"Sankham Technologies","url":"https:\/\/sankhamtech.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/sankhamtech.com\/#\/schema\/logo\/image\/","url":"https:\/\/sankhamtech.com\/wp-content\/uploads\/2023\/12\/Logo-Dark-1.png","contentUrl":"https:\/\/sankhamtech.com\/wp-content\/uploads\/2023\/12\/Logo-Dark-1.png","width":306,"height":74,"caption":"Sankham Technologies"},"image":{"@id":"https:\/\/sankhamtech.com\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/sankhamtech.com\/index.php\/wp-json\/wp\/v2\/pages\/3373","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sankhamtech.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sankhamtech.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sankhamtech.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sankhamtech.com\/index.php\/wp-json\/wp\/v2\/comments?post=3373"}],"version-history":[{"count":4,"href":"https:\/\/sankhamtech.com\/index.php\/wp-json\/wp\/v2\/pages\/3373\/revisions"}],"predecessor-version":[{"id":3377,"href":"https:\/\/sankhamtech.com\/index.php\/wp-json\/wp\/v2\/pages\/3373\/revisions\/3377"}],"up":[{"embeddable":true,"href":"https:\/\/sankhamtech.com\/index.php\/wp-json\/wp\/v2\/pages\/3335"}],"wp:attachment":[{"href":"https:\/\/sankhamtech.com\/index.php\/wp-json\/wp\/v2\/media?parent=3373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}