{"id":3368,"date":"2024-11-15T16:06:56","date_gmt":"2024-11-15T16:06:56","guid":{"rendered":"https:\/\/sankhamtech.com\/index.php\/content\/india\/english\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-objects-and-classes-in-java\/"},"modified":"2024-11-15T16:07:53","modified_gmt":"2024-11-15T16:07:53","slug":"understanding-objects-and-classes-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-objects-and-classes-in-java\/","title":{"rendered":"Understanding Objects and Classes in Java"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"3368\" class=\"elementor elementor-3368\">\n\t\t\t\t<div class=\"elementor-element elementor-element-aacc465 e-flex e-con-boxed e-con e-parent\" data-id=\"aacc465\" 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-50bbcd4 e-con-full e-flex e-con e-child\" data-id=\"50bbcd4\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-f748121 elementor-hidden-mobile elementor-widget elementor-widget-text-editor\" data-id=\"f748121\" 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-eb22509 elementor-hidden-desktop elementor-hidden-tablet elementor-widget elementor-widget-text-editor\" data-id=\"eb22509\" 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-c4875db elementor-hidden-mobile elementor-widget elementor-widget-darsanam_header_menu_widget\" data-id=\"c4875db\" 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\/' style='color: #FF7700 !important'>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\/'>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-752a8eb e-con-full e-flex e-con e-child\" data-id=\"752a8eb\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-f581ec8 elementor-widget elementor-widget-text-editor\" data-id=\"f581ec8\" 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 Objects and Classes in Java<\/h2><p><\/p><p><\/p><h4 class=\"wp-block-heading\"><\/h4><p>In Java, one of the foundational principles of Object-Oriented Programming (OOP) is the concept of Classes and Objects.<\/p><h4 class=\"wp-block-heading\"> <\/h4><h4 class=\"wp-block-heading\"><strong>What is an Object?<\/strong><\/h4><h4 class=\"wp-block-heading\"> <\/h4><p>Everything in this universe that can be uniquely identified is an object. For instance, every human in the universe is an object as they can be uniquely identified.<\/p><h4 class=\"wp-block-heading\"> <\/h4><h4 class=\"wp-block-heading\"><strong>What is a Class?<\/strong><\/h4><h4 class=\"wp-block-heading\"> <\/h4><p>Objects that have similar attributes and functionalities can be grouped into a set. The blueprint of such a set is called a class. For example, all humans have attributes like height and weight, and functions like eating and drinking.<\/p><h4 class=\"wp-block-heading\"> <\/h4><h4 class=\"wp-block-heading\"><strong>Example of Class Definition in Java:<\/strong><\/h4><h4 class=\"wp-block-heading\"> <\/h4><p>Here&#8217;s a simple example to illustrate a class in Java.<\/p><h4 class=\"wp-block-heading\"> <\/h4><pre class=\"wp-block-code\"><code>public class Car {\n    \/\/ Fields (Attributes)\n    String color;\n    int year;\n\n    \/\/ Method (Behavior)\n    void displayInfo() {\n        System.out.println(\"Car Color: \" + color + \", Year: \" + year);\n    }\n}\n<\/code><\/pre><h4 class=\"wp-block-heading\"> <\/h4><p>In this <code>Car<\/code> class, <code>color<\/code> and <code>year<\/code> are fields that represent the state of a <code>Car<\/code> object, and <code>displayInfo()<\/code> is a method that defines a behavior of the <code>Car<\/code>.<\/p><h4 class=\"wp-block-heading\"> <\/h4><h4 class=\"wp-block-heading\"><strong>Creating an Object and Calling it from the Main Method<\/strong><\/h4><h4 class=\"wp-block-heading\"> <\/h4><p>To use the <code>Car<\/code> class, you create an object of the class and access its fields and 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        \/\/ Creating an object of the Car class\n        Car myCar = new Car();\n        myCar.color = \"Red\";\n        myCar.year = 2021;\n\n        \/\/ Calling the method of the Car class\n        myCar.displayInfo();\n    }\n}\n<\/code><\/pre><h4 class=\"wp-block-heading\"> <\/h4><h4 class=\"wp-block-heading\"><strong>Adding a Constructor<\/strong><\/h4><h4 class=\"wp-block-heading\"> <\/h4><p>A constructor in Java is a special method used to initialize objects. The constructor is called when an object of a class is created. It can be used to set initial values for object attributes:<\/p><h4 class=\"wp-block-heading\"> <\/h4><pre class=\"wp-block-code\"><code>public class Car {\n    String color;\n    int year;\n\n    \/\/ Constructor\n    Car(String c, int y) {\n        color = c;\n        year = y;\n    }\n\n    void displayInfo() {\n        System.out.println(\"Car Color: \" + color + \", Year: \" + year);\n    }\n}\n\npublic class Main {\n    public static void main(String[] args) {\n        \/\/ Creating an object of the Car class using the constructor\n        Car myCar = new Car(\"Blue\", 2020);\n\n        \/\/ Calling the method of the Car class\n        myCar.displayInfo();\n    }\n}\n<\/code><\/pre><h4 class=\"wp-block-heading\"> <\/h4><p>In this modified example, the <code>Car<\/code> class now includes a constructor that initializes the <code>color<\/code> and <code>year<\/code> fields. When creating a new <code>Car<\/code> object in the <code>main<\/code> method, this constructor is invoked with the values <code>\"Blue\"<\/code> and <code>2020<\/code>.<\/p><h4 class=\"wp-block-heading\"> <\/h4><h4 class=\"wp-block-heading\"><strong>Understanding Constructors and Instantiation<\/strong><\/h4><h4 class=\"wp-block-heading\"> <\/h4><p>A constructor initializes the newly created object. It&#8217;s a special type of method that shares the same name as the class and has no return type. When you create an object using the <code>new<\/code> keyword, Java automatically calls the constructor to initialize the object. In our example, <code>new Car(\"Blue\", 2020)<\/code> creates a new <code>Car<\/code> object with the color set to &#8220;Blue&#8221; and the year set to 2020, which is then displayed by calling <code>displayInfo()<\/code>.<\/p><h4 class=\"wp-block-heading\"> <\/h4><p>In summary, a class in Java defines the template or blueprint for objects, and an object is an instance of a class with its own unique state and behaviors. Constructors add the capability to initialize objects when they are created, providing a flexible and powerful way to manage object creation.<\/p><h4 class=\"wp-block-heading\"> <\/h4><h4 class=\"wp-block-heading\">Understanding Static Variables and Methods in Java<\/h4><h4 class=\"wp-block-heading\"> <\/h4><p>In Java, along with regular instance variables and methods, there are static variables and methods. These static members belong to the class itself, rather than to any specific instance of the class.<\/p><h4 class=\"wp-block-heading\"> <\/h4><h4 class=\"wp-block-heading\">What are Static Variables?<\/h4><h4 class=\"wp-block-heading\"> <\/h4><p>Static variables, also known as class variables, are declared with the static keyword in a class, but outside a method, constructor or a block. Unlike instance variables, there is only one copy of a static variable per class, regardless of how many objects are created from it.<\/p><h4 class=\"wp-block-heading\"> <\/h4><p><strong>Example:<\/strong><\/p><h4 class=\"wp-block-heading\"> <\/h4><pre class=\"wp-block-code\"><code>public class Car {\n    static int numberOfCars;\n\n    Car() {\n        \/\/ Incrementing the number of Cars every time a new Car is created.\n        numberOfCars++;\n    }\n}\n<\/code><\/pre><h4 class=\"wp-block-heading\"> <\/h4><p>In this example, <code>numberOfCars<\/code> is a static variable. Regardless of the number of <code>Car<\/code> objects created, there will always be only one copy of <code>numberOfCars<\/code>.<\/p><h4 class=\"wp-block-heading\"> <\/h4><h4 class=\"wp-block-heading\">What are Static Methods?<\/h4><h4 class=\"wp-block-heading\"> <\/h4><p>Static methods, like static variables, belong to the class rather than the object. They can be called without creating an instance of the class. Static methods can access static data members and can change the value of it.<\/p><h4 class=\"wp-block-heading\"> <\/h4><p><strong>Example:<\/strong><\/p><h4 class=\"wp-block-heading\"> <\/h4><pre class=\"wp-block-code\"><code>public class Car {\n    static int numberOfCars;\n\n    static void displayNumberOfCars() {\n        System.out.println(\"Total number of cars: \" + numberOfCars);\n    }\n}\n\npublic class Main {\n    public static void main(String[] args) {\n        new Car();\n        new Car();\n        Car.displayNumberOfCars(); \/\/ Output: Total number of cars: 2\n    }\n}\n<\/code><\/pre><h4 class=\"wp-block-heading\"> <\/h4><p>n this example, <code>displayNumberOfCars<\/code> is a static method. It is called using the class name, <code>Car.displayNumberOfCars()<\/code>, and it accesses the static variable <code>numberOfCars<\/code>.<\/p><h4 class=\"wp-block-heading\"> <\/h4><h4 class=\"wp-block-heading\">Static Context<\/h4><h4 class=\"wp-block-heading\"> <\/h4><p>It&#8217;s important to note that static methods can only directly access other static methods and static data. They cannot access instance variables and instance methods directly. This is because static methods and variables are part of the class, not individual instances.<\/p><h4 class=\"wp-block-heading\"> <\/h4><h4 class=\"wp-block-heading\">Conclusion<\/h4><h4 class=\"wp-block-heading\"> <\/h4><p>Static variables and methods are essential for writing efficient and organized code in Java. They are used for memory management and to create methods and variables that belong to the class, not to any particular instance. Understanding how to use static members effectively is a key part of mastering Java programming.<\/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 Objects and Classes in Java<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3335,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-3368","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 Objects and Classes 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-objects-and-classes-in-java\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Understanding Objects and Classes 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 Objects and Classes 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-objects-and-classes-in-java\/\" \/>\n<meta property=\"og:site_name\" content=\"Sankham Technologies\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-15T16:07:53+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=\"4 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-objects-and-classes-in-java\\\/\",\"url\":\"https:\\\/\\\/sankhamtech.com\\\/index.php\\\/content\\\/in\\\/en\\\/home\\\/free-courses\\\/understanding-object-oriented-programming-in-java\\\/understanding-objects-and-classes-in-java\\\/\",\"name\":\"Understanding Objects and Classes in Java - Sankham Technologies\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/sankhamtech.com\\\/#website\"},\"datePublished\":\"2024-11-15T16:06:56+00:00\",\"dateModified\":\"2024-11-15T16:07:53+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/sankhamtech.com\\\/index.php\\\/content\\\/in\\\/en\\\/home\\\/free-courses\\\/understanding-object-oriented-programming-in-java\\\/understanding-objects-and-classes-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-objects-and-classes-in-java\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/sankhamtech.com\\\/index.php\\\/content\\\/in\\\/en\\\/home\\\/free-courses\\\/understanding-object-oriented-programming-in-java\\\/understanding-objects-and-classes-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 Objects and Classes 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 Objects and Classes 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-objects-and-classes-in-java\/","og_locale":"en_US","og_type":"article","og_title":"Understanding Objects and Classes 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 Objects and Classes in Java","og_url":"https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-objects-and-classes-in-java\/","og_site_name":"Sankham Technologies","article_modified_time":"2024-11-15T16:07:53+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"4 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-objects-and-classes-in-java\/","url":"https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-objects-and-classes-in-java\/","name":"Understanding Objects and Classes in Java - Sankham Technologies","isPartOf":{"@id":"https:\/\/sankhamtech.com\/#website"},"datePublished":"2024-11-15T16:06:56+00:00","dateModified":"2024-11-15T16:07:53+00:00","breadcrumb":{"@id":"https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-objects-and-classes-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-objects-and-classes-in-java\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/sankhamtech.com\/index.php\/content\/in\/en\/home\/free-courses\/understanding-object-oriented-programming-in-java\/understanding-objects-and-classes-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 Objects and Classes 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\/3368","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=3368"}],"version-history":[{"count":4,"href":"https:\/\/sankhamtech.com\/index.php\/wp-json\/wp\/v2\/pages\/3368\/revisions"}],"predecessor-version":[{"id":3372,"href":"https:\/\/sankhamtech.com\/index.php\/wp-json\/wp\/v2\/pages\/3368\/revisions\/3372"}],"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=3368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}