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
ashish jadhav 9ashish jadhav 9 

what is the use of virtual in class? Any simple example?

also please explain when to use override in method? and what is the use of static data type?
Piyush Kumar 58Piyush Kumar 58
Hello ,
virtual classes do not require any methods to be overriden and can be constructed as is without the need of extending. 

Virtual Class:
a) Can be constructed ( can create object ).
b) Can be extended
c) Can have regular methods
d) Can have virtual methods
e) Can not have abstract methods

for example have a look on this link:-