Search code examples
javaabstract-class

How to call abstract class methods to another class in java


can anybody tell me that. how can I call abstract class method to my own class in java?

thanks in advance


Solution

  • You need to first create a subclass of the abstract class. This will then contain the methods of that abstract class. You use the "extends" keyword.

    For example:

    public class MyClass extends AbstractClass 
    {
       //class content here...
    }