Prevent this method from being inherited or instantiated
Interview Answers
Anonymous
Feb 7, 2020
Added static keyword
Anonymous
Sep 24, 2024
You can't "instantiate" a method. However, you can encapsulate the method in a static class to prevent inheritance and instantiation of the embodying class.