Skip to main content
can we have more than 1 abstract methods in an abstract class
3 answers
  1. Jun 22, 2019, 6:26 AM
    Hi Anil,

    Yes, you can create multiple abstract methods in an abstract class. but the class which Implements abstract class have to override all the method.

    public abstract class SampleAbstract

    {

        public Task newTask;

        public void createT(Id caseId, Id accountId)

        {

            newTask = new Task();

            methodX();

            methodY();

        }

        public abstract void methodX();

        public abstract void methodY();

    }     

    I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

    Thanks,

    Ajay Dubedi

     
0/9000