Java Tutorial # 18 | Abstract classes and Methods in Java -Java Beginners tutorial by Java9s

preview_player
Показать описание
This video tutorial explains about the Abstract classes and Methods. Abstract Methods does not have implementation and Abstract classes cannot be instantiated. I have explained about the importance of Abstract classes and how sub classes should override the Abstract classes methods.
Рекомендации по теме
Комментарии
Автор

I found this helpful because you speak in a pace that I can handle -- not too fast, not too slow. Just right for me. thanks.

richardedward
Автор

This is very helpful. I learned more from your video than reading my dumb textbook. I'm a subscriber now :]

espi
Автор

Excellent, Sir your voice is very clear and to the point... Kepp doing good work

rasmiranjanbabu
Автор

Great Lecture. Its clear and precise. My personal feeling is that it could be even more better if you can use some IDE like eclipse to demonstrate the code part, as it checks for errors while coding.
Thank you!

kishorekumarkb
Автор

You can declare any number of methods in an abstract class which can be abstract or non abstract ones

javas
Автор

1. The StoreContact method belongs in the Mobile abstract class should have a return type.
2. The Smartphone class can not override the implementation of the final void calculator method of the Mobile class 
3. The concrete class SamsungGalaxy is miss the implimentation of the abstract method StoreContact belongs in the Mobile class.
4. The concrete class SamsungGalaxy is miss the implimentation of the method public void chat(), belongs in its own Class.
So SamsungGalaxy class should be declare as abstract or it should implements all the abstract methods of its super class. 

sandipesolz
Автор

Hi Srinivas, great lecture. Can you please provide the link to download the pdf of this tutorial? I can't find it on the site.

coolkrishrahul
Автор

Here you cannot create an instance of bike as it is abstract. To override, the method need not be abstract, all it takes that the classes should be in inheritance(extends)

javas
Автор

awesome...Sir I have a question. How does java know the arbitrary abstract method names? Suppose that  I use an arbitrary method name "gosterLan()"  instead of draw() or render  etc.. any ideas?

mehmetoymak
Автор

What is the difference between abstract and interface, for this example we can use an interface instead of abstract because 'Car' is abstract 100 present and we can implement 'move' method?

ninosalkaton
Автор

1) Cannot override the final method from Mobile
2)The type SamsungGalaxy must implement the inherited abstract method Mobile.storeContact()
3)chat method requires a body instead of a semicolon

shruthireddynallabolu
Автор

1. In the abstract class Mobile, the storeContact() method does not have a return type
2. The SmartPhone class can not override the implementation of the final void calculator method of the Mobile class
3. The concrete SamsungGalaxy class is missing unimplemented methods from the abstract SmartPhone and Mobile classes. There also needs to be an implementation for the public void chat() method.

I hope I'm close :)

urbannerdz
Автор

1) Void Calculator method in smartphone class cant be overrided from its superclass method, as void calculator is a final method in the mobile class.
2) The samsung galaxy class has to be a abstract class as it has a void chat(); abstract method in it or provide some implementation to void chat() method and make it concrete method.
3) The abstract method storecontact () is not implemented in any of the subclass.

kiransreenath
Автор

Abstract class (Smartphone) that is extending Mobile class can't implement any methods ( i.e. calculator and call) as it's been declared as abstract. I'm not sure about SamsungGalaxy class as there is no class as Smartphone though its syntax is right. StoreContact needs a return type. Kindly correct if I'm wrong. 

siddiquehassan
Автор

For the Brain Teaser.
1)The video chat method is not given any implementations in the SamsungGalaxy class.
2) The abstract method storeContact is not being overriden.
3) The Method Calculator which is marked as final is being overriden.

zohaibahmad
Автор

First thing is that you can't override a method which marked as final so method calculator can't be override in the SmartPhone class.Second thing is that there is a implementation of call method in SmartPhone class but no implementation for storeContact method it must be override in SmartPhone class.

Danishable
Автор

sir, i m charan, i have few doubts ... 1st of all u done a grate job!!!
question :

1) can we declare two or more abstract methods in non concrete class

ex:
public abstract class car
{
public abstract void hello();
public abstract void hell();
}


charanguru
Автор

Sir dis is satyamanyu, may u tell me what's d basic difference between interface & abstract class, i mean some authors say tat interface can not contains any concrete method, it only contains abstract method, but abstract class may contain, is dis true, may u tell me wat's d basic difference between abstract classes & interface?

satyamanyukumar
Автор

1.there is no return type defined for storeContact() method in mobile.
2.you cannot override method marked as final in subclasses ie. calculator()
3.storeContact() method is not overridden in SmartPhone class.
4.there is no implementation given for chat() method in SamsungGalaxy class, it has to be abstract.

prathameshrane
Автор

From where I can get this ppt ....pls answer me sir

vanikaeruthayaraj