<?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 Manndeep Vachhani on Medium]]></title>
        <description><![CDATA[Stories by Manndeep Vachhani on Medium]]></description>
        <link>https://medium.com/@manndeep?source=rss-20aefe092b1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*JjWuJFDylqa8fyHqIGycjQ.jpeg</url>
            <title>Stories by Manndeep Vachhani on Medium</title>
            <link>https://medium.com/@manndeep?source=rss-20aefe092b1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 02:58:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@manndeep/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[Abstract Class and Interface (When to use)]]></title>
            <link>https://medium.com/geekculture/abstract-class-and-interface-when-to-use-a9693d357d00?source=rss-20aefe092b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/a9693d357d00</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[abstract-class]]></category>
            <category><![CDATA[interfaces]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Manndeep Vachhani]]></dc:creator>
            <pubDate>Tue, 15 Jun 2021 15:44:53 GMT</pubDate>
            <atom:updated>2022-02-02T07:13:15.679Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Interface vs Abstract Class" src="https://cdn-images-1.medium.com/max/1024/1*TqFMyytoX7SedpRuvmpL_Q.jpeg" /></figure><p><strong>Theoretically</strong>, it comes easy to state what Abstract classes are and what Interfaces are in Java. This article should help you understand when you can use an Abstract class and when you can use an Interface when it comes to practice.</p><p>Here are the fundamental differences between an Abstract Class and an Interface :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kokUIYm8QiemgypK34BlaA.png" /><figcaption>From: <a href="https://www.tutorialspoint.com/Difference-between-Abstract-Class-and-Interface-in-Java">https://www.tutorialspoint.com/Difference-between-Abstract-Class-and-Interface-in-Java</a></figcaption></figure><p><strong>You know that right!</strong></p><p>But when you are to decide on what you should use, these examples may help you.</p><p>First of all, think of entities you want to create in your project. Make a list of methods you would want to include in an Abstract class or an Interface.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FTPl5N4Ci49ZQY%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FTPl5N4Ci49ZQY%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia4.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExODV1aWw0dm9lZ29hcXl5dDNqMDhpa3ZuYWJudHNwcXIxY2YzOThsMSZlcD12MV9naWZzX2dpZklkJmN0PWc%2FTPl5N4Ci49ZQY%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="326" frameborder="0" scrolling="no"><a href="https://medium.com/media/f877b87d96e262b1fe2072c9a469545a/href">https://medium.com/media/f877b87d96e262b1fe2072c9a469545a/href</a></iframe><p>I have thought of some, and this is my thought process to decide whether it will end up being an Abstract class or an Interface.</p><p><strong>When to use Abstract Class :</strong></p><p>Let’s take an example of a Superhero here, let’s create an abstract class “Superhero” with common methods that superheroes usually do.</p><p>Now, why abstract class here and not an interface? Because there can be child classes like Batman, Superman, Spiderman extending the SuperHero class. They all are heroes but we want to pass on specific things that superheroes pass on to child classes, the things that superheroes have to do.</p><p>It defines common behavior and attributes for the class. It’s more general or abstract. The subclass inherits common behavior but can override it in case the subclass needs a specific implementation of common behavior.</p><pre>// Super class<br>public abstract class Superhero {</pre><pre>    abstract void haveTragicPast();</pre><pre>    abstract void saveTheWorld();</pre><pre>    abstract void wearFancyDress();</pre><pre>    abstract void makeDramaticEntrance();</pre><pre>    abstract void haveSecretIdentity();<br>    <br>}</pre><pre>// Sub class<br>public class Batman extends Superhero {</pre><pre>}</pre><p>You can use an Abstract Class when…<br>i) You want child classes of the parent Abstract Class to be enforced to override concrete methods.<br>ii) Philosophically, you can think of it as a parent Abstract Class giving instructions to child classes which they have to follow.<br>iii) You want to define a specific entity and limit its usage for sub-entities.<br>iv) You want the class to have code other than just abstract methods.</p><p><strong>When to use Interface :</strong></p><p>Interfaces facilitate the implementation of behavior that is not typical to the Class. This is a special behavior that the Class wants to have.<br>e.g. Superheroes can fly, airplanes can fly, birds can fly, some insects can also fly. In Indian households, footwear also can fly. But that doesn’t mean birds or insects(or footwear) are superheroes.</p><p>In this case, the contract for the behavior is defined in the interface. Any class that wishes to have this behavior needs to implement the interface and adhere to the contract.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F10bKPDUM5H7m7u%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F10bKPDUM5H7m7u%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F10bKPDUM5H7m7u%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="326" frameborder="0" scrolling="no"><a href="https://medium.com/media/1559bc0306707aa5c3427e2b68188edf/href">https://medium.com/media/1559bc0306707aa5c3427e2b68188edf/href</a></iframe><p>So, there can be a FlyingBehavior interface.</p><pre>public interface FlyingBehavior {<br>    public void fly();<br>}</pre><pre>//Usage<br>public class Batman implements FlyingBehavior {<br>    public void fly() {<br>        System.out.println(&quot;I am batflying!&quot;);<br>    }<br>}</pre><pre>public class Pigeon implements FlyingBehavior {<br>    public void fly() {<br>        System.out.println(&quot;I am flying n&#39; shitting!&quot;);<br>    }<br>}</pre><pre>public class AirPlane implements FlyingBehavior {<br>    public void fly() {<br>        System.out.println(&quot;I am flying. Thank you Jet Engines!&quot;);<br>    }<br>}</pre><p>You can use an Interface when…<br>i) You want to enforce the execution of Interface methods to any underlying class as an implementation.<br>ii) You don’t want to have a parent-child relationship in your implementation.<br>iii) You want to design a plugin, a set of events that can be delivered to any of the classes it is implemented by.<br>iv) You want to implement the common behavior of a specific entity.<br>v) You are sure that no code will be there in an interface other than abstract methods.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FxoMhjms99ACLscc9Ge%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FxoMhjms99ACLscc9Ge%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FxoMhjms99ACLscc9Ge%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="326" frameborder="0" scrolling="no"><a href="https://medium.com/media/a43cd31a4ca711ad29ac99801025c22b/href">https://medium.com/media/a43cd31a4ca711ad29ac99801025c22b/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a9693d357d00" width="1" height="1" alt=""><hr><p><a href="https://medium.com/geekculture/abstract-class-and-interface-when-to-use-a9693d357d00">Abstract Class and Interface (When to use)</a> was originally published in <a href="https://medium.com/geekculture">Geek Culture</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[There is no master key to life!]]></title>
            <link>https://manndeep.medium.com/there-is-no-master-key-e9144eefa1b7?source=rss-20aefe092b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9144eefa1b7</guid>
            <category><![CDATA[life]]></category>
            <category><![CDATA[success]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[happiness]]></category>
            <category><![CDATA[philosophy]]></category>
            <dc:creator><![CDATA[Manndeep Vachhani]]></dc:creator>
            <pubDate>Sun, 09 Sep 2018 14:46:37 GMT</pubDate>
            <atom:updated>2021-06-13T06:53:16.621Z</atom:updated>
            <content:encoded><![CDATA[<h4>And how it costs a lifetime to find one.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nmnd3Zfg_hbOlLaH0FGbHg.jpeg" /></figure><p>The key to life is balance. The key to life is love. The key to life is peace.</p><p><strong>The key to life is any generous-sounding bullshit.</strong></p><p>We, at some point, want to believe because we seek motivation despite the fact that there are no shortcuts, no secret formulas, no cheat sheets. no superpowers in real life.</p><p>As an individual, there are two things that need to be assessed :</p><p><strong>i) How to be successful in life?<br>ii) What does success mean to me?</strong></p><p>The problem with these questions is the second one needs to be answered first! People often waste a lifetime trying to find the answer to the first question. And raise the second question when it’s too late!</p><p>The question <em>“How to be successful in life?”</em> cannot be answered until you answer <em>“What does success mean to me?”</em>. More often, in the urge of finding the key to success in life, people become more inclined to misinterpret the basics of life as keys to life.</p><blockquote>If you somehow get to know the banking passwords of the richest man on the earth. Do you believe that setting the same passwords for your accounts will make you the richest person?</blockquote><blockquote>The password is the key to his account. The account he managed to grow using the key to his life. His keys has no use in your life!</blockquote><p>There isn’t anything that can guarantee a happy life. Our desire to have one leads us to believe that there are tangible things that are created for the purpose. Well, they make our life easier indeed, but for happiness, we need to work.</p><p>We think only if I have more money, then I will be happy. Only if I have a car like the one I saw in an Instagram post, I will be happy. And you start the chase, and the chase never ends. A new definition of success will always be written on your brain with a dry erase marker. Unless of course, you keep asking the question whenever in doubt, <em>“What does success mean to me?”</em>.</p><p>Nothing’s wrong with chasing. Chase is the life, without it the life wouldn’t be any adventurous, and adventures give great excitement. However, picking up the right chases which give a sense of happiness is the true challenge. One question to ask here, <em>“Is the chase really worth it?”</em>.</p><blockquote><strong>What does success mean to us? When do we feel happy, fulfilled, satisfied? And how to keep doing it for the rest of the most of your life?</strong></blockquote><p>We have been acknowledged many unfortunate events in which celebrated people with a fancy successful professional life giving up on their life. They were indeed great achievers, but with all due respect, we can’t say they were successful and happy in their life!</p><blockquote>The greatest success in life is how the life itself is celebrated!</blockquote><p>It’s the life, it is meant to be lived not to be solved. But of course, we are humans. We’re crowded with other human beings. In the real-world or virtual social world, people keep shouting about their life goals, their happiness, their sadness, their shits that don’t deserve ours to be given.</p><blockquote>And what difference does that make to our lives? <strong>Well, no matter how happy we are in our lives, we are prone to believe that it’s not enough!</strong></blockquote><p>In this world, there is always someone who makes you feel like a loser! Remember, life is not a competition, it is a fun relay race where all can have their trophies, and pass them on to new generations.</p><blockquote>Locks come first than the keys!</blockquote><p>It’s better to be realistic about our lives. We don’t stand a chance to keep trying shortcuts, others’ keys to life!</p><blockquote><strong>Success is real, goals are real, satisfactions are real. AND THEY ARE VERY SUBJECTIVE.</strong></blockquote><p>No master key works for every lock. Life is an expedition to find the locks. And once you do it, put in your efforts to achieve it, learn from others’ mistakes, and forge your own goddamn key!</p><h4>Masterstroke :</h4><blockquote>He doesn’t need his name up in lights<br>He just wants to be heard whether it’s the beat or the mic<br>He feels so unlike everybody else, alone<br>In spite of the fact that some people still think that they know him<br>But fuck ’em, he knows the code, it’s not about the salary<br>It’s about reality and making some noise<br>Making a story, making sure his clique stays up<br>That means when he puts it down, Tak’s pickin’ it</blockquote><blockquote>-From the track “Remember the name”</blockquote><blockquote>by Mike Shinoda / Matthew Ryan Maginn / Takbir Khalid Bashir</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9144eefa1b7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>