52.7k views
3 votes
When you declare a method as abstract method ? Can I call a abstract method from a non abstract method ?

User Flapjack
by
7.7k points

1 Answer

3 votes

Answer: A method without body is called abstract method. A abstract method can be called from a non abstract class or method provided it is inherited using a subclass.

Step-by-step explanation:

An abstract method is a method which does not have a body, it just has opening and closing curly braces. A class having an abstract method is also declared as abstract class. We cannot make an object of the abstract class.

example : public abstract float multiply(float x, float y);

is an example of abstract method.

calling an abstract method from a non abstract method is possible provided it is inherited by a non abstract subclass.

User Fabien Greard
by
8.0k points