Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
1

wut r abstract classes

MatthewXia
MatthewXia

idk i dont know idont know i dontknow

2 years ago
You are viewing a single comment. View All
1
Coder100
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); }; }
2 years ago