+ 2

I do not clearly undurstand abstract classes in Java programming Language. I just want to see one concrete example to understant

Why Java Abstract classes

10th Jul 2017, 11:20 PM
Stephcyrille
Stephcyrille - avatar
7 odpowiedzi
+ 1
Hmmm... Yes, but it is a parent or super class that inherits it's functions (commonly for overriding) but it doesn't do anything by itself !---It's not a professional explanation---!
10th Jul 2017, 11:36 PM
Andrés04_ve
Andrés04_ve - avatar
+ 2
it can ne considerated at a parent class??
10th Jul 2017, 11:32 PM
Stephcyrille
Stephcyrille - avatar
+ 2
yeah! thanks! I just have some more ideas
10th Jul 2017, 11:40 PM
Stephcyrille
Stephcyrille - avatar
+ 2
public abstract class Boy{ abstract void eat(); }
11th Jul 2017, 12:00 AM
Stephcyrille
Stephcyrille - avatar
0
Are classes with only virtual functions. Abstract classes are used only for inherit it's contents
10th Jul 2017, 11:24 PM
Andrés04_ve
Andrés04_ve - avatar
0
Try making a simple code and let me see if you got the point
10th Jul 2017, 11:42 PM
Andrés04_ve
Andrés04_ve - avatar
0
hmmm, not exactly. The class could be an animal class that inherits to dog, cat and other animals class. Then every sub-class defines the abstract method with different behaviors (in this case, everyone eats different things)
11th Jul 2017, 12:05 AM
Andrés04_ve
Andrés04_ve - avatar