Multiple choice technology programming languages

Whats the output of following code Class A Public Overridable Sub F() End Sub End Class Class B Inherits A Public Overridable Sub F() End Sub End Class

  1. Runtime Error

  2. Compiler Error

  3. Compiler Throws a warning message

  4. Both A & B

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In VB.NET, if a derived class inherits a method and declares it with Public Overridable Sub F() instead of using the Overrides keyword, it implicitly hides the base member. This compiles but throws a warning message suggesting the use of the Shadows keyword.