NightOwl888 commented on PR #690:
URL: https://github.com/apache/lucenenet/pull/690#issuecomment-1280036869

   > I've also added virtual to methods that I found had the final keyword in 
the Java source code.
   
   virtual is the opposite of final.
   
   ## Java
   
   - `public`/`protected` methods implicitly default to `virtual` (there is no 
`virtual` keyword in Java, but they are overridable)
   - To make `public`/`protected` methods non-overridable, explicitly mark them 
`final`
   - When a subclass overrides a method, it can be explicitly marked `final` to 
make it non-overridable
   
   ## C#
   
   - `public`/`protected` methods (and properties) implicitly default to 
`sealed`
   - To make `public`/`protected` methods overridable, explicitly mark them 
`virtual`
   - When a subclass overrides a method, it can be explicitly marked `sealed` 
to make it non-overridable


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to