+ 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
7 Respostas
+ 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---!
+ 2
it can ne considerated at a parent class??
+ 2
yeah! thanks! I just have some more ideas
+ 2
public abstract class Boy{
abstract void eat();
}
0
Are classes with only virtual functions. Abstract classes are used only for inherit it's contents
0
Try making a simple code and let me see if you got the point
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)