TOP 6 difference between Abstract class and Interface in JAVA || Must know facts

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ม.ค. 2025

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

  • @mdmojahidshaba4808
    @mdmojahidshaba4808 6 ปีที่แล้ว +37

    Nice bro. thumbs up (go to 5:55 and make some correction you made both abstract method.)

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

      Great Catch Brother. Glad you found the mistake.Thank you.

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

      Cant we declare abstract method inside abstract class ?

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

      Yes you can....In fact if we have one method as abstract then the class needs to be defined as abstract..

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

      Ram Kris
      Hi Ram, even If we don't have any abstract method in our class still we can define it as abstract.
      If I don't want anybody to create the object of my class then I can define it as abstract..

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

      So if i have abstract class i cant create object of respective class ?

  • @99crazyrider
    @99crazyrider 5 ปีที่แล้ว +23

    This is how it should be explained! Every segment is explained and covered with an example, well done. No time wasted here.

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

    Finally someone who knows how to explain things, well done!

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

      What he is telling is theory , not at all connected to technical
      You are a disaster brenner

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

      @@arch3994 stfu moron, and keep your hateful comments with you we don't need that here...

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

    Finally came to know the clear the difference between Abstract and Interface. Thanks bro.

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

    Ur concepts are crystal clear ........ This is the best video abt abstract classes and interafaces. Keep it Up ...... God bless you and ur family

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

    Best video about the interface and abstract class. so glad to watch it.

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

    Spectacular explanation 👍 supperrrb

  • @vijaymohan.p
    @vijaymohan.p 6 ปีที่แล้ว +19

    In Java 8 : Functional interface is an interface that contains only one abstract method.

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

    Wow this is the best explanation for interface and abstract class. Thank you so much.

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

    Well explained bro, Thank you so much..... keep doing more videos..... 👌

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

    Good explanation !! Also one important reason why abstract class has constructor is to achieve constructor chaining. As we know the sole purpose of abstract class is to be extended. Now in any sub-class when object is created and initilized the first call under its constructor is call to super () i.e call to super class constructor and so abstract class has constructor. So if you don't keep any constructor explicitly then jvm keep one default constructor to abstract like other normal class. A constructor chaining goes till Object Class.

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

    I like this channel very much Abhilash will teach very easiest way !!!!Thank you😇😇😇

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

    Awesome Explanation keet it going 👍

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

    This is how it should be explained. Crisp and yet detailed. Thanks for making this man 👍🏽👌🏽

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

    Best Instructor at Best time . Currently I am trying to switch company your videos conatins most of those questions with best answers(Indian Version). Feels like entire Java interview questions at one place .
    Thanks is a small thing :D

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

    Maqsood bhai tum boht acche se samjha ta hai !! thank u

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

    Well done . Thank you for the clear explanation.

  • @varunrickstudios2868
    @varunrickstudios2868 5 หลายเดือนก่อน

    Fantastic explain thank you You are Spark 🔥

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

    Good one. (at 16:50 the constructor and class name mismatching.)

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

    Why dislike to this video..disliker please give explanation?? Your videos are very helpful dude👌👌

  • @AbhishekKumar-er4fu
    @AbhishekKumar-er4fu 3 ปีที่แล้ว

    Super Guru jee

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

    Seriously this is top class i literally lost 3 interviews because of this question but this time i confident to answer

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

    Wow, really your are amazing 👏

  • @RanaQaiserofficial.
    @RanaQaiserofficial. 5 ปีที่แล้ว

    Nice,superb...................................................................................................................................................

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

    Thanks very much for this video. No offense, but when I saw that you were Indian, I almost didn't watch. I have a problem with accents at my age, you see.
    Anyway, because your accent wasn't that thick, I struggled through, and I'm glad I did. Yours is probably the best video on TH-cam for explaining interfaces and Abstract classes. Everybody else just parrots what they've heard in other videos.
    Thanks again, I plan to watch more.

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

    Awesome explanation brother

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

    Great 👍

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

    Superb explanation... Thank you

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

    Great explanation...i searched lot of material for findings the difference but you have given best explanation at very point to point info....well done!!!

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

    Super man, well explained

  • @АльфредГордан
    @АльфредГордан 4 ปีที่แล้ว

    thanks...you are so cool.very clear explanation

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

    Content 🙏💥💥💥

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

    you are explaining very clearly brother thank you...

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

    Best video Bro ❤️❤️

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

    Very well explained

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

    NIce tutorial provide with Thread and Multithreading Concept tutorial with real time example

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

    Thank you it made scense today for me!

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

    man, thanks a lot for spendng time explaining and editing the video in a way that is so simple to follow along and understand

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

    Very clear explanation

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

    Absolute legend, thank you for the wonderful lession!

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

    Great explanation! Thank you so much!!!

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

    Good explanation

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

    Nice explaination for everything..

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

    Very informative video. Thank you

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

    Hi Abhilash, thank you for such a clear explanation, I think at 16:47 you meant B(int i){ this.i = i} while creating a constructor in the abstract class B, but you have typed A(int i) instead of B.

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

    Thanks for sharing

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

    nice tutorial, loved it

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

    thats a good explanation. now i am understand the difference between abstact class and interface................. good job ..... keep make a video like this

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

    you are just awesome teacher

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

    Very nice explanations ...

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

    nice man.. thanks for your time explaining others

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

    greeat video man, after many tries to understand, this served me the best.

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

    Awesome

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

    Best video in youtube ever, thank you for helping me understand.

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

    Thanks a lot for this , i was so confused in these concepts , but you helped a lot thanks a lot bro

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

    Superb

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

    good job....just one suggestion pls try to make more videos on conceptual topics of core java which mainly clear basic concepts.

  • @saptagireeshaurya2956
    @saptagireeshaurya2956 3 หลายเดือนก่อน

    Very nice

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

    Good info..Thank you

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

    great teacher

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

    Very helpful 👍

  • @113kishore
    @113kishore 5 ปีที่แล้ว

    Still I am not clear.. after java8 introduces interface with default methods... I don't see any strong reason why do we need 2 go for abstract class... Could u pls tell me

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

    Hello Brother, I have gone through all the videos of Selenium Express. These videos helped me a lot. Thanks for your these much effort, and now i want to learn the spring boot. Can you please upload series of Spring boot.

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

      yes you are correct, because constructor should have the same name as class name.

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

    nice video, keep up the great work

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

    This video is very very helpful

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

    Very nice Video. Thanks a lot. Was very helpful for understanding

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

    Nice explanation bro.plz take a look at 16:52 and make some correction you made constructor A which is not a class name.

  • @AbdulRahman-jx2vn
    @AbdulRahman-jx2vn 5 ปีที่แล้ว +3

    Hi Abilash,
    In one of the interview, one of the question asked to me, the question is, can u explain about your project architecture, I somewhat manage with the component has in my project, it is spring mvc project, runs on WebSphere server, it has view component, DAO component for db queries and controller component etc but what is the best to answer it, could you please answer to me.

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

    Interface used for two purposes in real-time projects
    1)to achieve multiple inheritance (1:M)
    2)to hide internal implementation
    And interface means you are providing user to access these methods only from implemented methods ,user cannot access non overriden method try it yourself
    Interface is like from one stone two birds are fallen.😅
    Ok bookish right general example like TV having covering all mother board internal connection but interface on off buttons volume buttons are interface only these things using we can interfer with TV so we are hiding internal implementation showing only services (on off vol+ vol-) take other examples think on it ex(Bluetooth speaker , computer etc)
    So interface is nothing big topic,it means what are the things user can access that's only we can make it interface implement of that class method and make it access other methods don't implement by interface those methods are not important to access to user (like mother board user not access from TV class so don't implement it and interface reference variable can't access )or security purpose we may call ,one object(user) interface with other object interface(TV or camera etc).

  • @SP-rm5ik
    @SP-rm5ik 6 ปีที่แล้ว +1

    Nice explanation keep it up.

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

    Awesome Bro, thanks a lot!

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

    your teaching style is very well it help me to cleared about abstract class and interface thanks sir

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

    excellent

  • @pnp.peeyush4959
    @pnp.peeyush4959 4 ปีที่แล้ว

    Prashant from Sairat movie?? JK haha, nice explanation though, thanks!

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

    nice explanation bro thanks

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

    Great video ! good luck ;)

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

    16:52 constructor name is different than class name.

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

    I didn't know we could declare methods with a body in an interface or variables in an interface. I have no idea about Java but in Csharp that is not allowed. In C# you only declare abstract methods, i.e method without a body. So, the only benefit is that interfaces allow multi-inheritance, which is good, while abstracts don't. But abstract classes can contain properties, non abstract methods as well as abstract methods. Is that right? Good video, thanks a lot.

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

    Bro ,ur way of teaching really super and very clear and ur English was fluently bro, keep it up bro👌👌👌👌👌👌👌👌👍👍👍👍👍👍💐💐💐💐💐

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

    your videos are very good, just want to mention Multi-treading video missing from interview questions

  • @ArvindKumar-en5mr
    @ArvindKumar-en5mr 6 ปีที่แล้ว

    Well done. Keep it up bro.

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

    This is really a very good explanation and very good information.. Thank you so much

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

    awesome bro

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

    Wonderful explanation

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

    Great bro but I have one doubt, After Interface in Java 8, it has both implementation and abstract method then why do we need Abstract class now? Is it a replacement for Abstract class?

    • @vishaltank1278
      @vishaltank1278 6 ปีที่แล้ว +7

      No. we need an abstract class because it's not possible to create a non-static, non-final, non-public variable in an interface. plus it's not possible to create a constructor in an interface. Where we can do this all in an abstract class.

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

    Great video

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

    Is concrete method by default,are they public nd abstract ??

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

    Best video.....but I didnt understand why the need to declare variables inside an interface ....and why they are final and static ?

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

    Rocking description

  • @DeepakSingh-mw9bf
    @DeepakSingh-mw9bf 4 ปีที่แล้ว

    Sweet

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

    superb explanation...

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

      but too many right right...but good one

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

    thank you.You got a new subscriber😇

  • @GauravGupta-on6nd
    @GauravGupta-on6nd 4 ปีที่แล้ว

    One question, what is the use of constructor in abstract class when we can not instantiate it?

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

    Hi in abstract example slide it has abstract keyword for implementation, it is wrong, please check it and correct it.

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

    You are doing a fantastic job!

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

    Nice explanation bro,thanks alot bro......

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

    Nice

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

    Thank you for your good work. I really enjoy watching your videos and I always learn something.

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

    You are amazing man ! god bless you my friend

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

    Very useful,, easy to understand.
    Please go next class with dagger 2 dependency injection