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

Поділитися
Вставка
  • Опубліковано 15 вер 2024

КОМЕНТАРІ • 237

  • @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.

  • @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

  • @manikannanmarimuthu9232
    @manikannanmarimuthu9232 5 років тому +5

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

  • @AmeyChittar
    @AmeyChittar 8 місяців тому

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

  • @inesbrenner2979
    @inesbrenner2979 5 років тому +34

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

    • @arch3994
      @arch3994 3 роки тому

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

    • @ashishpuma3950
      @ashishpuma3950 2 роки тому

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

  • @iam_shahrukh
    @iam_shahrukh 3 роки тому

    Awesome Explanation keet it going 👍

  • @RanaQaiserofficial.
    @RanaQaiserofficial. 4 роки тому

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

  • @pallavrajput6734
    @pallavrajput6734 3 роки тому +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.

  • @xerinaysawutaji8105
    @xerinaysawutaji8105 5 років тому +5

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

  • @NourKhafaji
    @NourKhafaji 9 місяців тому

    Well done . Thank you for the clear explanation.

  • @sainathpabba5392
    @sainathpabba5392 5 років тому +7

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

  • @testingDhippiuh
    @testingDhippiuh 4 роки тому

    Thanks for sharing

  • @atulsingh9266
    @atulsingh9266 Рік тому

    Content 🙏💥💥💥

  • @jaganmohanmylapuru5974
    @jaganmohanmylapuru5974 4 роки тому +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

  • @bharukatta
    @bharukatta 2 роки тому

    Awesome

  • @AbhishekKumar-er4fu
    @AbhishekKumar-er4fu 3 роки тому

    Super Guru jee

  • @varunrickstudios2868
    @varunrickstudios2868 23 дні тому

    Fantastic explain thank you You are Spark 🔥

  • @vakkalahari5449
    @vakkalahari5449 Рік тому

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

  • @vijaymohan.p
    @vijaymohan.p 6 років тому +19

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

  • @akshatjain9762
    @akshatjain9762 3 роки тому

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

  • @GiridharaReddy
    @GiridharaReddy Рік тому

    Wow, really your are amazing 👏

  • @desaiaditya12
    @desaiaditya12 4 роки тому

    Superb

  • @shashanksinghsisodiya514
    @shashanksinghsisodiya514 5 років тому +1

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

  • @ankush2362
    @ankush2362 2 роки тому

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

  • @muralimohan7097
    @muralimohan7097 3 роки тому

    Awesome explanation brother

  • @zebakhanumbadagi8846
    @zebakhanumbadagi8846 3 роки тому

    Very well explained

  • @suneelreddy6901
    @suneelreddy6901 3 роки тому

    Nice explanation

  • @АльфредГордан
    @АльфредГордан 4 роки тому

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

  • @subhashininallapati2080
    @subhashininallapati2080 3 роки тому

    excellent

  • @DeepakSingh-mw9bf
    @DeepakSingh-mw9bf 4 роки тому

    Sweet

  • @prima6170
    @prima6170 5 років тому +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 UA-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.

  • @gauravsaroch7024
    @gauravsaroch7024 4 роки тому

    Very clear explanation

  • @karamjitsinghsehdev3451
    @karamjitsinghsehdev3451 5 років тому

    Nice

  • @yatendra__singh
    @yatendra__singh 3 роки тому

    Wow

  • @ramanavanchanagiri1014
    @ramanavanchanagiri1014 2 роки тому

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

  • @harry6555
    @harry6555 4 роки тому

    great teacher

  • @santhoshchandran6952
    @santhoshchandran6952 2 роки тому

    Super man, well explained

  • @rajkhare5949
    @rajkhare5949 4 роки тому

    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!!!

  • @sanketpokharkar1377
    @sanketpokharkar1377 2 роки тому

    Best video Bro ❤️❤️

  • @morning8474
    @morning8474 3 роки тому

    you are just awesome teacher

  • @ranvijaysingh1591
    @ranvijaysingh1591 5 років тому +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.

  • @beryalex1798
    @beryalex1798 2 роки тому

    Thank you it made scense today for me!

  • @chiruapj3491
    @chiruapj3491 2 роки тому

    Spectacular explanation 👍 supperrrb

  • @inglevi1
    @inglevi1 6 років тому

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

  • @vikrampujari2952
    @vikrampujari2952 3 роки тому

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

  • @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).

  • @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.

  • @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

  • @akado5663
    @akado5663 6 років тому

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

  • @karthickn956
    @karthickn956 3 роки тому

    you are explaining very clearly brother thank you...

  • @alvaroisea2259
    @alvaroisea2259 2 роки тому

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

  • @stefanbats3311
    @stefanbats3311 4 роки тому +1

    Absolute legend, thank you for the wonderful lession!

  • @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.

  • @AbdulRahman-jx2vn
    @AbdulRahman-jx2vn 4 роки тому +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.

  • @vaishalijillewar7437
    @vaishalijillewar7437 4 роки тому

    Superb explanation... Thank you

  • @chasedunagan
    @chasedunagan 5 років тому

    Very informative video. Thank you

  • @omarelrafhi9595
    @omarelrafhi9595 4 роки тому

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

  • @Shailendrap008
    @Shailendrap008 5 років тому

    Nice explaination for everything..

  • @banabiharisahoo4008
    @banabiharisahoo4008 5 років тому

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

  • @pratapsingh-le2br
    @pratapsingh-le2br 6 років тому +3

    Gud! video but i recommend u will please relate any kind java video real time project explanation no need to common definition bcz these are definition already lot of tutorial are available and these technique to make in unique to other tutorial and video channel

  • @maverickmurugan7610
    @maverickmurugan7610 5 років тому

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

  • @kolluru17
    @kolluru17 6 років тому

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

  • @dbvs007
    @dbvs007 4 роки тому

    nice man.. thanks for your time explaining others

  • @vijayrajsingh2348
    @vijayrajsingh2348 3 роки тому

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

  • @suzy6455
    @suzy6455 3 роки тому

    Great explanation! Thank you so much!!!

  • @dnyaneshwarinare8759
    @dnyaneshwarinare8759 Рік тому

    Thanks allot

  • @kirankumaralam
    @kirankumaralam 5 років тому +6

    16:52 constructor name is different than class name.

  • @astitvagoel8207
    @astitvagoel8207 2 роки тому

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

  • @camilosalazar9987
    @camilosalazar9987 6 років тому +2

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

  • @krishnasingh9111
    @krishnasingh9111 5 років тому

    Very nice explanations ...

  • @shivammaniya2962
    @shivammaniya2962 4 роки тому

    better bro

  • @ganeshghuge3405
    @ganeshghuge3405 4 роки тому

    Great 👍

  • @harispk9750
    @harispk9750 5 років тому

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

  • @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 ?

  • @SP-rm5ik
    @SP-rm5ik 5 років тому +1

    Nice explanation keep it up.

  • @mahirakhan4172
    @mahirakhan4172 5 років тому

    Thanks

  • @qwarlockz8017
    @qwarlockz8017 5 років тому

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

  • @prasadsardesai
    @prasadsardesai 5 років тому

    This video is very very helpful

  • @ParthaSarathiDas_stoned
    @ParthaSarathiDas_stoned 5 років тому +1

    Mr., your explanation is fantastic. But it has no difference from average bloggers, request you to put some example from demo or live projects where people can really learn to implement it practically with more clear idea. God bless you.

  • @Salimsh12y
    @Salimsh12y 3 роки тому

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

  • @mans100
    @mans100 4 роки тому

    nice tutorial, loved it

  • @umainti4184
    @umainti4184 6 років тому +1

    Good info..Thank you

  • @Skripturz
    @Skripturz 6 років тому

    nice video, keep up the great work

  • @KrishnaDhakate
    @KrishnaDhakate 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 5 років тому +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.

  • @sivag8493
    @sivag8493 6 років тому

    Great explanation. please provide Java-8 fetures.
    Abstract class provides partial implementation,then what is the use of that partial implementation?

  • @balanssocial1880
    @balanssocial1880 6 років тому

    hi abilash good explanation and given more point on abstract vs interface. one general doubt what does this error=>" Cannot make a static reference to the non-static method ( test()) from the type (mainabsclass)"

  • @tenawabateneh6745
    @tenawabateneh6745 5 років тому

    nice explanation bro thanks

  • @subhampattanaik9363
    @subhampattanaik9363 6 років тому +1

    Hey, Abhilash doing a work.please upload videos of features of java1.8 features.This will be the great help for many of us.

  • @Dziki8332
    @Dziki8332 Рік тому

    11:33 not only abstract class doesn't support multiple inheritance but any class

  • @rvng6
    @rvng6 5 років тому

    Very helpful 👍

  • @mayureshwagh2078
    @mayureshwagh2078 5 років тому

    Nice explanation. Many doubts are cleared through this video. Can you please make videos on all java OOPS concepts. Eagerly waiting for your reply. great video.

    • @SeleniumExpress
      @SeleniumExpress  5 років тому

      Glad to know that it helped.. Please go through my channel you will find the videos that you are looking for. Else please let me know about the topics that you are interested about, I will revert you back with the link if I have covered them.

  • @ranjandas7891
    @ranjandas7891 5 років тому

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

  • @rameshbabu5754
    @rameshbabu5754 4 роки тому +1

    I got this question number of times so please can you do Hash Set internally work in java video

  • @eliastamraz5231
    @eliastamraz5231 5 років тому

    thanks

  • @Icecodes
    @Icecodes 6 років тому

    Great video

  • @JaySukku
    @JaySukku 5 років тому

    Nice one.. I had one doubt 16.29 as u said it doesn't have a complete implementation how can u create an object. As we know that an abstract class contains both concrete and abstract methods with in it ... So apart from that is there any specific reason that we can't create an object for abstract class

  • @dineshsahu8933
    @dineshsahu8933 4 роки тому

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

  • @kumaradiv
    @kumaradiv 4 роки тому

    Awesome Bro, thanks a lot!

  • @Togrul280
    @Togrul280 6 років тому

    Great video ! good luck ;)