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..
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.
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
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.
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!!!
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.
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).
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.
thats a good explanation. now i am understand the difference between abstact class and interface................. good job ..... keep make a video like this
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.
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.
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
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.
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?
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.
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)"
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.
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.
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
Nice bro. thumbs up (go to 5:55 and make some correction you made both abstract method.)
Great Catch Brother. Glad you found the mistake.Thank you.
Cant we declare abstract method inside abstract class ?
Yes you can....In fact if we have one method as abstract then the class needs to be defined as abstract..
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..
So if i have abstract class i cant create object of respective class ?
This is how it should be explained! Every segment is explained and covered with an example, well done. No time wasted here.
Ur concepts are crystal clear ........ This is the best video abt abstract classes and interafaces. Keep it Up ...... God bless you and ur family
Finally came to know the clear the difference between Abstract and Interface. Thanks bro.
Wow this is the best explanation for interface and abstract class. Thank you so much.
Finally someone who knows how to explain things, well done!
What he is telling is theory , not at all connected to technical
You are a disaster brenner
@@arch3994 stfu moron, and keep your hateful comments with you we don't need that here...
Awesome Explanation keet it going 👍
Nice,superb...................................................................................................................................................
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.
Best video about the interface and abstract class. so glad to watch it.
Well done . Thank you for the clear explanation.
Good one. (at 16:50 the constructor and class name mismatching.)
Thanks for sharing
Content 🙏💥💥💥
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
Awesome
Super Guru jee
Fantastic explain thank you You are Spark 🔥
I like this channel very much Abhilash will teach very easiest way !!!!Thank you😇😇😇
In Java 8 : Functional interface is an interface that contains only one abstract method.
Maqsood bhai tum boht acche se samjha ta hai !! thank u
Wow, really your are amazing 👏
Superb
Why dislike to this video..disliker please give explanation?? Your videos are very helpful dude👌👌
This is how it should be explained. Crisp and yet detailed. Thanks for making this man 👍🏽👌🏽
Awesome explanation brother
Very well explained
Nice explanation
thanks...you are so cool.very clear explanation
excellent
Sweet
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.
Very clear explanation
Nice
Wow
Seriously this is top class i literally lost 3 interviews because of this question but this time i confident to answer
great teacher
Super man, well explained
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!!!
Best video Bro ❤️❤️
you are just awesome teacher
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.
yes you are correct, because constructor should have the same name as class name.
Thank you it made scense today for me!
Spectacular explanation 👍 supperrrb
NIce tutorial provide with Thread and Multithreading Concept tutorial with real time example
Well explained bro, Thank you so much..... keep doing more videos..... 👌
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).
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.
thats a good explanation. now i am understand the difference between abstact class and interface................. good job ..... keep make a video like this
Very nice Video. Thanks a lot. Was very helpful for understanding
you are explaining very clearly brother thank you...
man, thanks a lot for spendng time explaining and editing the video in a way that is so simple to follow along and understand
Absolute legend, thank you for the wonderful lession!
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.
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.
Superb explanation... Thank you
Very informative video. Thank you
greeat video man, after many tries to understand, this served me the best.
Nice explaination for everything..
your teaching style is very well it help me to cleared about abstract class and interface thanks sir
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
Bro ,ur way of teaching really super and very clear and ur English was fluently bro, keep it up bro👌👌👌👌👌👌👌👌👍👍👍👍👍👍💐💐💐💐💐
This is really a very good explanation and very good information.. Thank you so much
nice man.. thanks for your time explaining others
good job....just one suggestion pls try to make more videos on conceptual topics of core java which mainly clear basic concepts.
Great explanation! Thank you so much!!!
Thanks allot
16:52 constructor name is different than class name.
Thanks a lot for this , i was so confused in these concepts , but you helped a lot thanks a lot bro
Best video in youtube ever, thank you for helping me understand.
Very nice explanations ...
better bro
Great 👍
Very useful,, easy to understand.
Please go next class with dagger 2 dependency injection
Best video.....but I didnt understand why the need to declare variables inside an interface ....and why they are final and static ?
Nice explanation keep it up.
Thanks
Thank you for your good work. I really enjoy watching your videos and I always learn something.
This video is very very helpful
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.
your videos are very good, just want to mention Multi-treading video missing from interview questions
nice tutorial, loved it
Good info..Thank you
Thank you Uma..
nice video, keep up the great work
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?
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.
Great explanation. please provide Java-8 fetures.
Abstract class provides partial implementation,then what is the use of that partial implementation?
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)"
nice explanation bro thanks
Hey, Abhilash doing a work.please upload videos of features of java1.8 features.This will be the great help for many of us.
11:33 not only abstract class doesn't support multiple inheritance but any class
Very helpful 👍
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.
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.
Nice explanation bro,thanks alot bro......
I got this question number of times so please can you do Hash Set internally work in java video
thanks
Great video
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
Nice explanation bro.plz take a look at 16:52 and make some correction you made constructor A which is not a class name.
Awesome Bro, thanks a lot!
Great video ! good luck ;)