{"id":114,"date":"2026-06-02T12:09:55","date_gmt":"2026-06-02T12:09:55","guid":{"rendered":"https:\/\/gigz.pk\/javaapp\/?post_type=lesson&#038;p=114"},"modified":"2026-06-06T07:29:00","modified_gmt":"2026-06-06T07:29:00","slug":"polymorphism","status":"publish","type":"lesson","link":"https:\/\/gigz.pk\/javaapp\/?lesson=polymorphism","title":{"rendered":"Polymorphism"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Polymorphism is one of the four fundamental principles of Object-Oriented Programming (OOP) in Java. The word &#8220;Polymorphism&#8221; means <strong>many forms<\/strong>. In Java, polymorphism allows a single method, object, or interface to perform different actions depending on the situation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Polymorphism helps developers write flexible, reusable, and maintainable code. It is widely used in Java applications, Android development, enterprise software, and large-scale systems.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is Polymorphism in Java?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Polymorphism is the ability of an object to take multiple forms. It allows the same method name or interface to behave differently based on the object that is using it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A person can be a student, teacher, or employee.<\/li>\n\n\n\n<li>A shape can be a circle, rectangle, or triangle.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Although they belong to the same category, their behavior can differ.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In Java, polymorphism enables one interface to represent different implementations.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why Use Polymorphism?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Polymorphism provides several advantages:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Improves code reusability<\/li>\n\n\n\n<li>Reduces code complexity<\/li>\n\n\n\n<li>Increases flexibility<\/li>\n\n\n\n<li>Simplifies maintenance<\/li>\n\n\n\n<li>Supports extensibility<\/li>\n\n\n\n<li>Encourages clean application design<\/li>\n\n\n\n<li>Enhances Object-Oriented Programming<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">It is an essential concept for professional software development.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Types of Polymorphism in Java<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Java mainly supports two types of polymorphism:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Compile-Time Polymorphism<\/li>\n\n\n\n<li>Run-Time Polymorphism<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Both types help developers achieve flexibility in different ways.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Compile-Time Polymorphism<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Compile-time polymorphism is achieved through <strong>method overloading<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In method overloading, multiple methods have the same name but different parameters.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The compiler determines which method to execute during compilation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example of Method Overloading<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>class Calculator {\n\n    int add(int a, int b) {\n\n        return a + b;\n\n    }\n\n    int add(int a, int b, int c) {\n\n        return a + b + c;\n\n    }\n\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Using the methods:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Calculator calc = new Calculator();\n\nSystem.out.println(calc.add(5, 10));\n\nSystem.out.println(calc.add(5, 10, 15));\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>15\n30\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The method name remains the same, but different parameter lists provide different behaviors.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Features of Compile-Time Polymorphism<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Faster execution<\/li>\n\n\n\n<li>Resolved during compilation<\/li>\n\n\n\n<li>Achieved using method overloading<\/li>\n\n\n\n<li>Improves readability<\/li>\n\n\n\n<li>Reduces the need for multiple method names<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">This type of polymorphism is also known as <strong>static polymorphism<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Run-Time Polymorphism<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run-time polymorphism is achieved through <strong>method overriding<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In method overriding, a child class provides its own implementation of a method already defined in the parent class.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The method that executes is determined during program execution.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example of Method Overriding<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>class Animal {\n\n    void sound() {\n\n        System.out.println(\"Animal makes a sound\");\n\n    }\n\n}\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>class Dog extends Animal {\n\n    @Override\n    void sound() {\n\n        System.out.println(\"Dog barks\");\n\n    }\n\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Using the objects:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Animal animal = new Dog();\n\nanimal.sound();\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Dog barks\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Although the reference type is Animal, the Dog version of the method executes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Features of Run-Time Polymorphism<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Determined during execution<\/li>\n\n\n\n<li>Achieved through method overriding<\/li>\n\n\n\n<li>Supports dynamic behavior<\/li>\n\n\n\n<li>Increases flexibility<\/li>\n\n\n\n<li>Enables extensible application design<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">This type is also known as <strong>dynamic polymorphism<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Understanding Method Overriding<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Method overriding occurs when:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The child class inherits from the parent class<\/li>\n\n\n\n<li>Both methods have the same name<\/li>\n\n\n\n<li>Both methods have the same parameters<\/li>\n\n\n\n<li>The return type is compatible<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Vehicle {\n\n    void start() {\n\n        System.out.println(\"Vehicle Starting\");\n\n    }\n\n}\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>class Car extends Vehicle {\n\n    @Override\n    void start() {\n\n        System.out.println(\"Car Starting\");\n\n    }\n\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Car Starting\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The child class customizes the inherited behavior.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Polymorphism Using Parent References<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">One of the most powerful features of polymorphism is using parent class references.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Animal animal;\n\nanimal = new Dog();\n\nanimal.sound();\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>animal = new Cat();\n\nanimal.sound();\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Different objects can be assigned to the same reference variable.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This makes applications highly flexible.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Real-World Example<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Payment processing system:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Payment {\n\n    void pay() {\n\n        System.out.println(\"Processing Payment\");\n\n    }\n\n}\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>class CreditCardPayment extends Payment {\n\n    @Override\n    void pay() {\n\n        System.out.println(\"Payment via Credit Card\");\n\n    }\n\n}\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>class PayPalPayment extends Payment {\n\n    @Override\n    void pay() {\n\n        System.out.println(\"Payment via PayPal\");\n\n    }\n\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Using polymorphism:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Payment payment;\n\npayment = new CreditCardPayment();\n\npayment.pay();\n\npayment = new PayPalPayment();\n\npayment.pay();\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Payment via Credit Card\nPayment via PayPal\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The same reference variable handles different payment methods.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Benefits of Polymorphism<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Improved Flexibility<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Code can work with multiple object types.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Better Code Reusability<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Existing classes can be reused effectively.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Easier Maintenance<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Changes in child classes require fewer modifications elsewhere.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Simplified Code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Reduces complex conditional statements.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Enhanced Scalability<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">New classes can be added without changing existing code.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Supports Open-Closed Principle<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Applications can be extended without modifying core functionality.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Polymorphism and Inheritance<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Polymorphism depends heavily on inheritance.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Animal {\n\n    void sound() {\n\n    }\n\n}\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>class Dog extends Animal {\n\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Without inheritance, method overriding and runtime polymorphism cannot occur.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Inheritance provides the relationship, while polymorphism provides the flexible behavior.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Polymorphism and Interfaces<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Polymorphism can also be achieved through interfaces.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>interface Shape {\n\n    void draw();\n\n}\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>class Circle implements Shape {\n\n    public void draw() {\n\n        System.out.println(\"Drawing Circle\");\n\n    }\n\n}\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>class Rectangle implements Shape {\n\n    public void draw() {\n\n        System.out.println(\"Drawing Rectangle\");\n\n    }\n\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Using polymorphism:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Shape shape;\n\nshape = new Circle();\n\nshape.draw();\n\nshape = new Rectangle();\n\nshape.draw();\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Drawing Circle\nDrawing Rectangle\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Interfaces provide even greater flexibility.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Applications of Polymorphism<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Polymorphism is widely used in:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Android applications<\/li>\n\n\n\n<li>Banking systems<\/li>\n\n\n\n<li>Payment gateways<\/li>\n\n\n\n<li>E-commerce platforms<\/li>\n\n\n\n<li>Enterprise software<\/li>\n\n\n\n<li>Game development<\/li>\n\n\n\n<li>Hospital management systems<\/li>\n\n\n\n<li>Educational applications<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Most modern software systems rely on polymorphism.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common Beginner Mistakes<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Confusing Overloading and Overriding<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Overloading:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add(int a, int b)\nadd(int a, int b, int c)\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Overriding:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Same method signature in parent and child classes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Forgetting Inheritance<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Method overriding requires inheritance.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Using Incorrect Method Signatures<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Overridden methods must match the parent method signature.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Not Understanding Dynamic Binding<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The method executed depends on the actual object, not the reference type.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Best Practices<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When using polymorphism:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use meaningful class hierarchies<\/li>\n\n\n\n<li>Prefer interfaces when appropriate<\/li>\n\n\n\n<li>Follow Object-Oriented Design principles<\/li>\n\n\n\n<li>Use method overriding carefully<\/li>\n\n\n\n<li>Avoid unnecessary complexity<\/li>\n\n\n\n<li>Keep methods focused on a single responsibility<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">These practices improve software quality and maintainability.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Importance of Polymorphism<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Polymorphism is important because it:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Enables flexible software design<\/li>\n\n\n\n<li>Supports code reusability<\/li>\n\n\n\n<li>Improves maintainability<\/li>\n\n\n\n<li>Reduces code duplication<\/li>\n\n\n\n<li>Simplifies application architecture<\/li>\n\n\n\n<li>Enhances scalability<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">It is one of the most powerful features of Object-Oriented Programming.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Polymorphism in Java allows objects, methods, and interfaces to take multiple forms and behave differently depending on the context. Through method overloading and method overriding, developers can create flexible, reusable, and maintainable applications. Mastering polymorphism is essential for understanding advanced Object-Oriented Programming concepts and building professional Java, Android, and enterprise software solutions.<\/p>\n\n\n<div class=\"yoast-breadcrumbs\"><span><span><a href=\"https:\/\/gigz.pk\/javaapp\">Home<\/a><\/span> \u00bb <span class=\"breadcrumb_last\" aria-current=\"page\">Intermediate Java > Object-Oriented Programming > Polymorphism<\/span><\/span><\/div>\n\n\n<div class=\"schema-faq wp-block-yoast-faq-block\"><\/div>\n","protected":false},"menu_order":30,"template":"","class_list":["post-114","lesson","type-lesson","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Polymorphism - Learn Java used for Apps with GiGz.PK<\/title>\n<meta name=\"description\" content=\"Learn Java polymorphism \u2014 compile-time and runtime types, method overloading, overriding, and real-world OOP examples explained.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gigz.pk\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Polymorphism - Learn Java used for Apps with GiGz.PK\" \/>\n<meta property=\"og:description\" content=\"Learn Java polymorphism \u2014 compile-time and runtime types, method overloading, overriding, and real-world OOP examples explained.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gigz.pk\/\" \/>\n<meta property=\"og:site_name\" content=\"Learn Java used for Apps with GiGz.PK\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-06T07:29:00+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\",\"FAQPage\"],\"@id\":\"https:\\\/\\\/gigz.pk\\\/javaapp\\\/?lesson=polymorphism\",\"url\":\"https:\\\/\\\/gigz.pk\\\/\",\"name\":\"Polymorphism - Learn Java used for Apps with GiGz.PK\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gigz.pk\\\/javaapp\\\/#website\"},\"datePublished\":\"2026-06-02T12:09:55+00:00\",\"dateModified\":\"2026-06-06T07:29:00+00:00\",\"description\":\"Learn Java polymorphism \u2014 compile-time and runtime types, method overloading, overriding, and real-world OOP examples explained.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/gigz.pk\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gigz.pk\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/gigz.pk\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/gigz.pk\\\/javaapp\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Intermediate Java > Object-Oriented Programming > Polymorphism\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/gigz.pk\\\/javaapp\\\/#website\",\"url\":\"https:\\\/\\\/gigz.pk\\\/javaapp\\\/\",\"name\":\"Learn Java used for Apps with GiGz.PK\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/gigz.pk\\\/javaapp\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Polymorphism - Learn Java used for Apps with GiGz.PK","description":"Learn Java polymorphism \u2014 compile-time and runtime types, method overloading, overriding, and real-world OOP examples explained.","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:\/\/gigz.pk\/","og_locale":"en_US","og_type":"article","og_title":"Polymorphism - Learn Java used for Apps with GiGz.PK","og_description":"Learn Java polymorphism \u2014 compile-time and runtime types, method overloading, overriding, and real-world OOP examples explained.","og_url":"https:\/\/gigz.pk\/","og_site_name":"Learn Java used for Apps with GiGz.PK","article_modified_time":"2026-06-06T07:29:00+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["WebPage","FAQPage"],"@id":"https:\/\/gigz.pk\/javaapp\/?lesson=polymorphism","url":"https:\/\/gigz.pk\/","name":"Polymorphism - Learn Java used for Apps with GiGz.PK","isPartOf":{"@id":"https:\/\/gigz.pk\/javaapp\/#website"},"datePublished":"2026-06-02T12:09:55+00:00","dateModified":"2026-06-06T07:29:00+00:00","description":"Learn Java polymorphism \u2014 compile-time and runtime types, method overloading, overriding, and real-world OOP examples explained.","breadcrumb":{"@id":"https:\/\/gigz.pk\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gigz.pk\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/gigz.pk\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gigz.pk\/javaapp"},{"@type":"ListItem","position":2,"name":"Intermediate Java > Object-Oriented Programming > Polymorphism"}]},{"@type":"WebSite","@id":"https:\/\/gigz.pk\/javaapp\/#website","url":"https:\/\/gigz.pk\/javaapp\/","name":"Learn Java used for Apps with GiGz.PK","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gigz.pk\/javaapp\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/gigz.pk\/javaapp\/index.php?rest_route=\/wp\/v2\/lesson\/114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gigz.pk\/javaapp\/index.php?rest_route=\/wp\/v2\/lesson"}],"about":[{"href":"https:\/\/gigz.pk\/javaapp\/index.php?rest_route=\/wp\/v2\/types\/lesson"}],"wp:attachment":[{"href":"https:\/\/gigz.pk\/javaapp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}