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
divakar ddddivakar ddd 

what is the d/w transient and virtual keyword?

NagendraNagendra (Salesforce Developers) 
Hi Divakar,

Virtual Keyword: The global access modifier declares that this class is known by all Apex code everywhere. All classes that contain methods defined with the web service keyword must be declared as global. ... You cannot override a method with the override keyword unless the class has been defined as virtual.

Transient Keyword: You can also use the transient keyword in Apex classes that are serializable, namely in controllers, controller extensions, or classes that implement the Batchable or Schedulable interface. ... Declaring variables as transient reduces view state size.

Hope this helps you.

Kindly mark this as solved if the information was helpful.