192k views
4 votes
An abstract method ____.

is any method inthe abstract class
cannot beinherited
has nobody
is found in asubclass and overrides methods in a superclass using the reservedword abstract

User Maress
by
8.4k points

1 Answer

4 votes

Answer:

has no body.

Step-by-step explanation:

An abstract method is a method which has no body.

It is contained in a class which is marked as abstract.

The implementation of such method is specified in a subclass.

For example:

//abstract class

abstract class myClass{

/* Abstract method */

public abstract void mymethod(int a, int b);

}

//Concrete class extending abstract class

class Concrete extends myClass{

public void mymethod(int a, int b){

return a+b;

}

}

User Tommy Stanton
by
8.2k points