Activity Forums Salesforce® Discussions What is the use of virtual keyword for a class in Salesforce?

  • Shweta

    Member
    August 27, 2020 at 2:39 pm

    We can use a virtual keyword to indicates that this class can be extended and overrides are allowed. If the methods need to be overridden, then the classes should be declared with the virtual keyword.

  • Ayush

    Member
    August 28, 2020 at 7:03 am

    Virtual classes allow you to define "full" classes. They implement all of the necessary functionality to operate on their own, but can be extended by child classes in order to allow customization of its behavior.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos