Are there any advantages or disadvantages to using the ‘virtual’ keyword over the ‘super’ keyword when accessing methods in a base class?
I understand that both can be used to override the method in a base class but it would be nice to know the advantages and disadvantages of both.
In reply to GeorgeOnwubuya:
You only use the virtual keyword when declaring a class method, no when accessing/calling the method. The super keyword is only used when calling a method from an derived class, and you need to access the method from the class you are extended from.
You should checkout my SystemVerilog OOP course, especially the second session on inheritance.