<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Vikash Kumar on Medium]]></title>
        <description><![CDATA[Stories by Vikash Kumar on Medium]]></description>
        <link>https://medium.com/@techGrid?source=rss-2d052c769a39------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*19mD69BpoU8O9X4L</url>
            <title>Stories by Vikash Kumar on Medium</title>
            <link>https://medium.com/@techGrid?source=rss-2d052c769a39------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 03:46:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@techGrid/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[OOPS Concepts in Java with Real-time Examples]]></title>
            <link>https://medium.com/@techGrid/oops-concepts-in-java-with-real-time-examples-1e8110a76462?source=rss-2d052c769a39------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e8110a76462</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[freelancing]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Vikash Kumar]]></dc:creator>
            <pubDate>Sat, 10 Oct 2020 09:49:37 GMT</pubDate>
            <atom:updated>2020-10-10T09:51:10.162Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*afEsLhGrv9DVXpXgwmxAEg.jpeg" /></figure><blockquote><em>As we all know Object-Oriented Programming Concepts are very important for programming. Without having an idea about OOPS concepts, you will not be able to design systems in the object-oriented programming model.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/993/1*Hoqp_oeroKPgjCyf13y4bg.jpeg" /></figure><p>Oops(Object-oriented programming System) is a programming paradigm based on the concept of “Objects” that contain data and methods. The primary purpose of object-oriented programming is to increase the flexibility and maintainability of programs. Object oriented programming brings together data and its behavior(methods) in a single location(object) makes it easier to understand how a program works.</p><h4><em>List of the core Oops Concepts:-</em></h4><pre><strong><em>1. Object<br>2. Class<br>3. Inheritance<br>4. Polymorphism<br>5. Abstraction<br>6. Encapsulation</em></strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*0PiKOVy1HV8xnhMIrYNVrA.png" /></figure><h4>1. Object</h4><p>The Object is the real-time entity having some state and behavior. In Java, Object is an instance of the class having the instance variables like the state of the object and the methods as the behavior of the object. The object of a class can be created by using the new keyword in Java Programming language.</p><h4>2. Class</h4><p>A class is a group of objects which have common properties. It is a template or blueprint from which objects are created. In other word, a class is the group of objects exhibiting same behavior will come under the same group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*c3KHdzvK7nBbyMfkiplWww.png" /></figure><h3>Java class and corresponding templates</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*ljXyNZgn4i3dCMXIpOs7Gg.png" /></figure><h3>3. Inheritance</h3><p>Inheritance is another important concept in object-oriented programming. Inheritance in Java is a mechanism by which one class acquires the properties and behaviors of the parent class. It’s essentially creating a parent-child relationship between classes. In Java, we will use inheritance mainly for code re-usability and maintainability.</p><p>The Class from where the properties are inherit is known as Super Class</p><p>The Class to which the properties are inherited is known as Sub Class</p><p>IS-A relationship between a super class and its sub classes by using extends keyword.</p><p>A subclass inherits all the non-private members (fields, methods, and nested classes) from its superclass. Constructors are not members, so they are not inherited by subclasses, but the constructor of the super class can be invoked from the subclass.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/364/1*fQi0PeN0WzNfM5UtI8L8DQ.png" /></figure><h3>Types of Inheritance</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*2hz3E4iN93fT_dcFb90eEA.jpeg" /></figure><h4>Why multiple inheritance is not allowed in java?</h4><blockquote>In multiple inheritance a “Sub class” will have more than one “Super class”. When we create an object of Sub class either directly or indirectly Super class constructor should be call in order to complete constructor chaining process.But since, we have more than one Super class. There is an ambiguity in calling Super class constructor .Because of this ambiguity constructor chaining process will remain incomplete,Hence Multiple inheritance is not allowed in java.</blockquote><h4>4. Polymorphism</h4><p>Polymorphism is the concept where an object behaves differently in different situations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*TXEj88WC4qiO91Gq0PhuQA.jpeg" /></figure><p><strong>There are two types of polymorphism</strong> — <strong>compile time polymorphism and runtime polymorphism.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*ogXXsfUlJaBw-7kzJAZREg.png" /></figure><h4>5. Abstraction</h4><p>Abstraction is the concept of hiding the internal details and describing things in simple terms. Consider the below example</p><p>All are performing operations on the ATM machine like cash withdrawal, money transfer, retrieve mini-statement…etc. but we can’t know the internal details about ATM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*M97TaIuH9CRVtwQtVU8Zjw.png" /></figure><h4>6. Encapsulation</h4><p>Encapsulation is the mechanism that binds the data members of the class with the methods together into a single entity.</p><p>Capsule, it is wrapped with different medicines. In a capsule, all medicine is encapsulated inside a capsule.</p><p>A Java class is an example of encapsulation. Java bean is the fully encapsulated class because all the data members are private here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/1*0ssKzqLYpSgCDYUiQH2moQ.png" /></figure><p>A jar file is an encapsulation of byte code files.</p><h4>That’s all for a quick round-up on OOPS concepts.</h4><h3>Summary</h3><blockquote>Java is a robust and scalable object-oriented programming language that is based on the concept of objects and classes. It offers features like inheritance, abstraction, encapsulation, and polymorphism for developing an efficient and reliable code.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e8110a76462" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>