Sumbody plis explain this statement | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Sumbody plis explain this statement

An abstract method is a method that is declared without an implementation (without braces, and followed by a semicolon): abstract void walk();

8th Mar 2018, 6:09 AM
stephen haokip
stephen haokip - avatar
3 Answers
+ 1
abstract mean incomplete. You use them to implement something in your main code. Eg. Class A {abstract void walk(); } Class B : A { implement walk method here } I don't know in java. In C# abstract can inherit but can't use by instantiation.
8th Mar 2018, 6:19 AM
Sylar
+ 1
I'm not sure but... classes are blueprints so u could create multiple objects based on it. when your objects have different behavior. you just create an abstract behavior (method) for it in the class . and in your objects you give them specific behavior
8th Mar 2018, 6:22 AM
Farshaad Heydari
Farshaad Heydari - avatar