I’m trying to make spreadsheet with class/method modifiers. The spreadsheet itself can be located here, although I have some questions:
1) As I read, methods also can be sealed, but what’s the purpose of this? Protecting method against overriding?
2) Does fields also have to be abstract in abstract class?
3) Can virtual method have body in defined object/class?
1: yes, exactly that; stopping a virtual method from being overridden again in a subclass
2: fields are never abstract; fields are implementation; nothing has to be abstract in an abstract class
3: yes, in that the virtual modifier is distinct from the abstract modifier. Both represent a virtual-method – the difference is entirely whether there is an implementation in the base class