function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sathisathi 

plsgive me solution

hi.......

i have a doubt pls............will we use in heritance in  salesforce ? 

Rahul SharmaRahul Sharma

Yes, Oops concepts can be used in Salesforce(Apex) too.


Batch classes and schedulers are the best example of inheritance. They use implement to extract the logic from batchable and Schedulable classes respectively.


Check this out. 

Bindhyachal Kumar SinghBindhyachal Kumar Singh

Hi Sathi,

 

Yes, You can use inheritence as same as Java or C++.

 

Use following code as a sample which uses Inheritence.

 

public class AB{

public class A{

}

public class B extends A{

}

}

 

Here AB is a outer class and A and B is an inner class.  B extends A used here for inheritence.

sathisathi

hi.....can u give me some example programs using inheritance.