OOP interview questions :- What is the difference between Abstraction and Encapsulation ?

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ธ.ค. 2011
  • For more such videos visit www.questpond.com
    See our other Step by Step video series below :-
    Learn angular tutorial for beginners tinyurl.com/ycd9j895
    Learn MVC Core step by step :- tinyurl.com/y9jt3wkv
    Learn Data Science in 1 hour :- tinyurl.com/y5o7qbau
    Learn MSBI Step by Step in 32 hours:- goo.gl/TTpFZN
    Learn Xamarin Mobile Programming Step by Step :- goo.gl/WDVFuy
    Learn Design Pattern Step by Step in 8 hours:- goo.gl/eJdn0m
    Learn C# Step by Step in 100 hours :- goo.gl/FNlqn3
    Learn Data structures & algorithm in 8 hours :-tinyurl.com/ybx29c5s
    Learn SQL Server Step by Step in 16 hours:- tinyurl.com/ja4zmwu
    Learn Javascript in 2 hours :- tinyurl.com/zkljbdl
    Learn SharePoint Step by Step in 8 hours:- goo.gl/XQKHeP
    Learn TypeScript in 45 Minutes :- goo.gl/oRkawI
    Learn webpack in 50 minutes:- goo.gl/ab7VJi
    Learn Visual Studio code in 10 steps for beginners:- tinyurl.com/lwgv8r8
    Learn Tableau step by step :- tinyurl.com/kh6ojyo
    Many developers are confused between Abstraction and encapsulation. If you see the definitions Abstraction means show only what is necessary and encapsulation means hide complexity which looks almost one and the same. In this video we will try to unlead practically the difference between Abstraction and Encapsulation.
    Get our 500 videos from www.questpond.com
    We are also distributing a 200 page Ebook ".NET Interview questions and Answers ". If you want this ebook please share this video in your facebook/twitter/linkedin account and email us on questpond@questpond.com with the shared link and we will email you the PDF.

ความคิดเห็น • 332

  • @dnfvideo
    @dnfvideo  2 ปีที่แล้ว +3

    Do not miss our Interview Question video series
    30 Important C# Interview Questions : th-cam.com/video/BKynEBPqiIM/w-d-xo.html
    25 Important ASP.NET Interview Questions : th-cam.com/video/pXmMdmJUC0g/w-d-xo.html
    25 Angular Interview Questions : th-cam.com/video/-jeoyDJDsSM/w-d-xo.html
    5 MSBI Interview Questions : th-cam.com/video/5E815aXAwYQ/w-d-xo.html

    • @wyattzain5486
      @wyattzain5486 2 ปีที่แล้ว

      You all probably dont give a damn but does anyone know of a method to log back into an Instagram account..?
      I stupidly forgot my login password. I love any assistance you can offer me

    • @mauricekaysen9783
      @mauricekaysen9783 2 ปีที่แล้ว

      @Wyatt Zain Instablaster :)

    • @wyattzain5486
      @wyattzain5486 2 ปีที่แล้ว

      @Maurice Kaysen i really appreciate your reply. I got to the site on google and Im in the hacking process atm.
      Takes quite some time so I will get back to you later when my account password hopefully is recovered.

    • @wyattzain5486
      @wyattzain5486 2 ปีที่แล้ว

      @Maurice Kaysen it worked and I actually got access to my account again. I am so happy:D
      Thanks so much you saved my ass :D

    • @mauricekaysen9783
      @mauricekaysen9783 2 ปีที่แล้ว

      @Wyatt Zain you are welcome xD

  • @osknyo
    @osknyo 4 ปีที่แล้ว +36

    Not gonna lie for the first 3 mins I was questioning where this was going. Great vid.

  • @naiche.
    @naiche. 7 ปีที่แล้ว +50

    Thank you for this video!
    TL;DW or for those who still might not understand:
    Abstraction: The concept of allowing the user of your class to have access to only what they need. (Concept)
    Encapsulation: The physical code that prevents the user from accessing fields or methods you do not want them to (Actual Implementation)
    Good example would be if a user is trying to deposit to an account balance. Account balances can't be negative or over 100,000, say. So your add function has a check. A user can circumvent these checks by saying obj.balance = -123;
    This is bad, so we want to use "Abstraction" to allow user access to only the things we want them to.
    So we make balance private, and now the user can only add through YOUR function. The act of making the field private and adding a modifier method is "Encapsulation".
    So as Manoj said, Encapsulation implements Abstraction.

    • @stannisbarracuda5693
      @stannisbarracuda5693 6 ปีที่แล้ว

      thanks man perfect explanation i understand

    • @kanedang5343
      @kanedang5343 5 ปีที่แล้ว

      You just gave the best explanation through a short and perfect example, thanks!

    • @selena4082
      @selena4082 5 ปีที่แล้ว

      thank you so much.

    • @MCrystalMaidenn
      @MCrystalMaidenn 2 ปีที่แล้ว

      I still don't understand. So if the user were to say obj.balance = -123, it wouldn't work becuase you have an add function that checks if its negative or over 100k. So in this case, we don't need to use abstraction because the user can't do anything if the given answer is not in the right criteria. Am I right?

  • @DeepayanDas24
    @DeepayanDas24 4 ปีที่แล้ว +22

    Encapsulation: Data Hiding,
    Abstraction: Implementation hiding.
    Eg Getter/Setter methods are used to access encapsulated attribute data, similarly as in this video example calling a public method wherein other private methods would be executed, would be an abstraction.

    • @zilverman7820
      @zilverman7820 ปีที่แล้ว +1

      No, abstraction is only putting data that are only essential to the object. Encapsulation is data hiding.

    • @shubhamjain54519
      @shubhamjain54519 10 หลายเดือนก่อน

      @DeepayanDas24 is correct

  • @anoopkar1982
    @anoopkar1982 11 ปีที่แล้ว +7

    encapsulation is all about data hiding..... making properites private and making it accessible only through the behavious of the same object.. Thus providing necessary securty to the state of the object.. You cannot miss this point when u differentiate ans and enc.... all other points that you have told i completely agree

  • @kopilkaiser8991
    @kopilkaiser8991 ปีที่แล้ว +2

    I am regularly watching your videos to get theoretical and practical knowledge on C#. I would say I'm a junior developer coding for years but recently from mid of 2022, I took C# seriously. Your videos are helping me to elevate my understanding much higher, and being able to understand in depth. Thank you for your hard work. I will keep watching, share with others, and share my thoughts on each video unless I'm feeling lazy to comment.

  • @raushanthakur661
    @raushanthakur661 4 ปีที่แล้ว +5

    In more than 20 interview I was asked differences and I never explained. Finally I got, Great man..

    • @Anmolkumar-ke6oq
      @Anmolkumar-ke6oq 4 ปีที่แล้ว +1

      to yr padh leta phle interview k baad hi

  • @ManojDeshwal
    @ManojDeshwal 3 ปีที่แล้ว +22

    This video gives the exact clarity what I was looking for. No confusion now between abstraction and encapsulation 🙂👍👍

    • @shivakumar-ep7gf
      @shivakumar-ep7gf 3 ปีที่แล้ว

      I seen your Video sir It is understanding Clearly.......

  • @umreddy4855
    @umreddy4855 5 ปีที่แล้ว +5

    Thank you. This one video helped more than all the theory stuff I read on abstraction and encapsulation. Keep up the good work. Thanks again.

  • @iortizvictory
    @iortizvictory 11 ปีที่แล้ว +3

    I really love this video. You've really done a brillant job explaining a difficult concept. Great job!

  • @Nobo_On_The_Rocks
    @Nobo_On_The_Rocks 7 ปีที่แล้ว +4

    Yes practically it's very difficult to explain these two concepts, and this is the very basic. So it's important to get a better feel of these, from the beginning.
    Thanks.

  • @wendiilu02
    @wendiilu02 9 ปีที่แล้ว +3

    Thank you! I'm a student and this helped me so much understanding what abstraction and encapsulation is.

  • @ianshumansingh
    @ianshumansingh 8 ปีที่แล้ว +2

    best video on abstraction,even stack-overflow could not make me understand..
    thank u

  • @ravikrishna5305
    @ravikrishna5305 8 ปีที่แล้ว +12

    And finally i came to know the difference btw Abstraction and Encapsulation.. :)
    Great Explanation Sir.. (y)

  • @ganeshchidambaram4452
    @ganeshchidambaram4452 3 ปีที่แล้ว

    I have seen a number of videos in search of the difference between abstraction and encapsulation but this video is the best and I understood the concept : )Thank you sir.

  • @akshayr6281
    @akshayr6281 5 ปีที่แล้ว +30

    Abstraction is thought process, and Encapsulation is Real Implementation.

    • @notanonymous3976
      @notanonymous3976 3 ปีที่แล้ว +3

      @Jack Wells no it didnt you guys are a bunch of liars

  • @ocsicnarf04
    @ocsicnarf04 8 ปีที่แล้ว +3

    my salute! thank you for this simple explanation. I'd say, it's very well explained.

  • @muhammadwaqas6886
    @muhammadwaqas6886 5 ปีที่แล้ว +3

    Thank You soooo much Sir, you have cleared one of my biggest confusion in object oriented paradigm,thank you soooooo much.

  • @avlkanth68
    @avlkanth68 2 ปีที่แล้ว

    That explanation was really good. Absolutely no confusion!
    Thank you very much!

  • @pramood99
    @pramood99 3 ปีที่แล้ว +1

    Perfect and exact explanation. I had too much confusion, now all cleared. Thanks

  • @jeffryjoseph5596
    @jeffryjoseph5596 3 ปีที่แล้ว

    Thanks for your clarification..i searched the whole internet and i found this video answering my question.

  • @HassaanRaza
    @HassaanRaza 6 ปีที่แล้ว

    THE BEST Explanation, detailed and on point!

  • @vijayshrivastava9803
    @vijayshrivastava9803 8 ปีที่แล้ว +2

    this video actually made me understand the difference.. superb...

  • @karumpilhouse
    @karumpilhouse 12 ปีที่แล้ว +14

    The best explanation i ever heard... perfect and clear...!

  • @joelgaiciyadu
    @joelgaiciyadu 2 ปีที่แล้ว

    The last four minutes of the video, was what chnaged my mind. I loved the way you tabled it. Mean explanation. Thank you very much.

  • @mukeshtiwari9795
    @mukeshtiwari9795 9 ปีที่แล้ว +1

    Great Representation...And Today i get it in the glance of programming word, that how both works...

  • @SinghDilip-hz1iq
    @SinghDilip-hz1iq 5 ปีที่แล้ว +1

    Now, I've got what's the abstraction n encapsulation.... Really nice video.. thnx

  • @SaurinVala87
    @SaurinVala87 5 ปีที่แล้ว

    Best and simplest explanation of attraction and encapsulation.

  • @phanikumar3140
    @phanikumar3140 10 ปีที่แล้ว +1

    Thank you very much for the video.. I use to have a lot of confusion between abstraction and encapsulation before. Now it is pretty much clear. Once again thank u :-)

  • @nagarajumanupuri844
    @nagarajumanupuri844 10 ปีที่แล้ว

    Thank u so much..... I am one of the developer who will confuse these terms always.. You cleared all my questions

  • @soumalyasahoo2664
    @soumalyasahoo2664 4 ปีที่แล้ว

    It really took a long time to understand the difference between them..they always appeared the same to me..but now...now i understand...thanks

  • @zealoussuresh
    @zealoussuresh 10 ปีที่แล้ว +2

    Wow ! Great practical explanation !

  • @somesbhowmick2082
    @somesbhowmick2082 9 ปีที่แล้ว

    Really excellent videos you have created. before you I does not have find such meaning full and clear concept from any other tutorials or videos. Thanks a lot. You really know what actually needs a senior and Junior developer in current days. I purchase your videos and getting preparation on that.

  • @mahendramungamuru9500
    @mahendramungamuru9500 4 ปีที่แล้ว +1

    Really beautiful expalination my complete confusion is vanished by this video thank you very much .....:-)

  • @ajitkumar15
    @ajitkumar15 5 ปีที่แล้ว

    Nice video to remove such a confusing topic. Thanks a million !!

  • @Ruhinaify
    @Ruhinaify 12 ปีที่แล้ว +1

    i was really good... i have never seen somebuddy explaing these concepts that nicely...

  • @climatecautious4210
    @climatecautious4210 2 ปีที่แล้ว

    You freed me of confusions! Great job

  • @aloktripathi1502
    @aloktripathi1502 7 ปีที่แล้ว +1

    Thank you sir, Its very helpful to me and clear the confusion about both very similar topic.

  • @swbharatbansal
    @swbharatbansal 6 ปีที่แล้ว +1

    Nice Explanation!!! Thank you for clearing my confusion about this difference,

  • @prakashpandey1770
    @prakashpandey1770 8 ปีที่แล้ว +18

    what i understand:-
    abstraction: what are minimum functions, and variable should expose to out side of our class.
    encapsulation : how to achieve this requirement, means how to implement.
    plz correct me if it is wrong....
    ..... as manoj said.

    • @dnfvideo
      @dnfvideo  8 ปีที่แล้ว +2

      Yes Prakash absolutely you are on track.

    • @DeepakKumar-uz4xy
      @DeepakKumar-uz4xy 5 ปีที่แล้ว +1

      Yeah but abstraction achieve by using abstract classes. So abstraction also implementation. Now you are wrong.🙁🙁🙁

  • @Ravikantsharma01
    @Ravikantsharma01 11 ปีที่แล้ว

    one interviewer asked me to show the abstraction in coding on a paper , but i failed as i had known only the verbal answer that's it , but this video made my day.
    thank you a lot.....

  • @moolikethecow1172
    @moolikethecow1172 8 ปีที่แล้ว +1

    Very well explained. Thank you!

  • @peter1983nabagram
    @peter1983nabagram 8 ปีที่แล้ว +1

    Best Explanation I can think off

  • @aishwaryanand600
    @aishwaryanand600 11 ปีที่แล้ว

    yours videos are the best video to understand the basics of .NET.Very Good.Keep it up.

  • @mcm1024
    @mcm1024 12 ปีที่แล้ว

    These are great videos. You are a good teacher.

  • @anikbutt22
    @anikbutt22 12 ปีที่แล้ว +1

    very much clear..awesome session.. thank you alot.

  • @rfdave3980
    @rfdave3980 ปีที่แล้ว

    Sir you have made this so clear. Thank you

  • @jesusstudentbrett
    @jesusstudentbrett 2 ปีที่แล้ว

    One word... Excellent!!

  • @DaBBoSaH
    @DaBBoSaH 10 ปีที่แล้ว

    wow this is fantastic!! There is also the idea that we can deal with Car regardless of its subtype, whether Ford, or Fiet... that detail can be abstracted away...

  • @SunilSingh-kc4nh
    @SunilSingh-kc4nh 5 ปีที่แล้ว

    this was the best way to differentiate Encapsulation and Abstraction

  • @devd5820
    @devd5820 2 ปีที่แล้ว

    what an explanation!! best ever..Shiv Sir is always the best

  • @mayurnerkar9682
    @mayurnerkar9682 3 ปีที่แล้ว

    Sir...! This is *Great* explanation given for those two terms Thank You so much!

  • @ayeshawaheed8791
    @ayeshawaheed8791 3 ปีที่แล้ว

    A very useful explanation! Thank you!

  • @psalt21
    @psalt21 7 ปีที่แล้ว +1

    Well done! This helped me very much

  • @hellsing357
    @hellsing357 12 ปีที่แล้ว +1

    wow
    the explanation is
    crystal clear
    Thank you sir...
    More powers

  • @silverHawk2001
    @silverHawk2001 12 ปีที่แล้ว

    Beautifully explained.

  • @Sunil.Pal789
    @Sunil.Pal789 8 ปีที่แล้ว +1

    excellent video....very easy to understand concept

  • @erfanmoghaddam4491
    @erfanmoghaddam4491 5 ปีที่แล้ว +1

    Thanks a lot sir for this very clear explanation!

  • @hafsamalik5219
    @hafsamalik5219 2 ปีที่แล้ว

    You Perfectly clarify my confusion🌼

  • @vishnukumar-zn6di
    @vishnukumar-zn6di ปีที่แล้ว

    Clear and simple, Thank You

  • @obaymardini
    @obaymardini 9 ปีที่แล้ว +1

    thanks, great demonstration

  • @ms.abhasaxena7249
    @ms.abhasaxena7249 3 ปีที่แล้ว

    Finally, I understood. Thank you!

  • @sumithrapackirisamy7462
    @sumithrapackirisamy7462 2 ปีที่แล้ว

    Awesome Sir I learned very clearly what exact abstract and encapsulation

  • @joolakataka
    @joolakataka 4 ปีที่แล้ว

    Cool really simple explanation on abstraction and encapsulation.

  • @avinashtippe1113
    @avinashtippe1113 2 ปีที่แล้ว

    Simple and clear.. thanks for video

  • @shwetakota
    @shwetakota 7 ปีที่แล้ว

    Thank you for your videos. much helpful.

  • @prateekpk7240
    @prateekpk7240 10 ปีที่แล้ว

    Very useful videos! Thanks!

  • @skeiltte
    @skeiltte 8 ปีที่แล้ว +1

    Brilliant explanation! Thank you so much. =)

  • @handover007
    @handover007 10 ปีที่แล้ว

    very nicely explained ..an eye opener..

  • @WoundedEgo
    @WoundedEgo 12 ปีที่แล้ว +1

    Very clear, thanks!

  • @rakeshdas32
    @rakeshdas32 3 ปีที่แล้ว

    Now way better to understand. Thanks for the video.

  • @coolsee07
    @coolsee07 11 ปีที่แล้ว +1

    very well explained.. thank you...

  • @dev_brand
    @dev_brand 5 ปีที่แล้ว +1

    Thank you fot the great explanation!

  • @rajsoftthink
    @rajsoftthink 7 ปีที่แล้ว +2

    Nice explanations and thanks a lot for your effort... :)

  • @TechtoPick
    @TechtoPick 9 ปีที่แล้ว +1

    Thank u it solves mine problem :)

  • @khurshidmalik565
    @khurshidmalik565 2 ปีที่แล้ว

    Thank you so much, Sir. It gives a clear understanding

  • @chrisdan81
    @chrisdan81 5 ปีที่แล้ว

    thank you. This enlightened me.

  • @cvismenu
    @cvismenu 8 ปีที่แล้ว +1

    Amazing tutorial

  • @SwapnilJadhavLive
    @SwapnilJadhavLive 2 ปีที่แล้ว

    You have helped me clear this concept 🤗

  • @syafiighazali
    @syafiighazali 3 ปีที่แล้ว

    Brilliant explanation, thanks so much 🙌

  • @andrewg9987
    @andrewg9987 8 ปีที่แล้ว +1

    Very nice job!

  • @muralipurushothaman9515
    @muralipurushothaman9515 4 ปีที่แล้ว

    its very clear, Excellent!!!

  • @zuzuba3481
    @zuzuba3481 4 ปีที่แล้ว

    You are really great bro.. really extraordinary.. I saw lots of others videos.. but you are ultimate...

  • @MuhammadUsman-rp3ph
    @MuhammadUsman-rp3ph 5 ปีที่แล้ว +1

    I appreciate it.. Great explaination

  • @ramagirisrikanth3583
    @ramagirisrikanth3583 7 ปีที่แล้ว

    very good example and explanation ! thnk u!

  • @YogeshDhanayat
    @YogeshDhanayat 8 ปีที่แล้ว +1

    great work
    thanks for this

  • @mareeduharish
    @mareeduharish 11 ปีที่แล้ว

    Superb demonstration boss.

  • @arvindsrinivas786
    @arvindsrinivas786 11 ปีที่แล้ว

    nicely explained. Great job

  • @manishswaminath
    @manishswaminath 10 ปีที่แล้ว +2

    Superb !!!!!!!!! cleared doubt of Abstraction and encapsulation ..Really Great Sir..

  • @sarikabiwalkar4037
    @sarikabiwalkar4037 7 ปีที่แล้ว

    such a good video to understand!

  • @dnfvideo
    @dnfvideo  11 ปีที่แล้ว +1

    encapsulation make sure that the property of an object and the behaviours which deals with those property are put together.
    --In other words showing is necessary , putting things which are logically together.
    it makes sure that an extrenal object cannot directly access the peoperty of the object.
    -- So how does it ensure that external object can not access directly. ENCAPSULATION.
    it essetiallly enforces security.
    --I doubt
    exposing only the essential behaviours
    -- i did say what is necessary

  • @EminoMeneko
    @EminoMeneko 3 ปีที่แล้ว

    Definitions are at 9:43
    Not sure I wouldn't need more docs to complete.
    Nice video thought. Got me closer to understand.

  • @mqutub15
    @mqutub15 10 ปีที่แล้ว +1

    This is excellent. Great and clear explanation. Thank you very much.

  • @mphothobakgale7851
    @mphothobakgale7851 2 ปีที่แล้ว

    Great video. Thank you

  • @souriroy5466
    @souriroy5466 6 ปีที่แล้ว

    great description

  • @anonymexxx
    @anonymexxx 12 ปีที่แล้ว

    How did you make that windows form? it looks nice

  • @anandrajput007
    @anandrajput007 10 ปีที่แล้ว +3

    nice work...

  • @natarajan82
    @natarajan82 12 ปีที่แล้ว

    Crystal clear thanks a lot.

  • @mudassariqbal2290
    @mudassariqbal2290 4 ปีที่แล้ว +2

    This video make my day

  • @saswatimohanty2223
    @saswatimohanty2223 10 หลายเดือนก่อน

    Good Example. Thanks