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.
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.
Thanks,
Nagendra