+ 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.