Skip to content
Sign upLog in
← Back to Community

wut r abstract classes

Profile icon
MatthewXia

idk i dont know idont know i dontknow

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
Profile icon
MatthewXia
Comments
hotnewtop
Profile icon
Coder100

Abstract classes are classes that can be implemented. Something like:

abstract class Animal { abstract void Eat(String food); abstract void Talk(String talk); }

then we can implement it:

class Lion extends Animal { void Eat(String animal) { System.out.Println("The lion ate a " + meat + "'s meat"); }; void Talk(String talk) { System.out.Println("Roar! Translation: " + talk); }; }