The following code contains an example, in which a static method is called via a null reference.
1 | public class Test { |
Because Test::greeting is a static method, the expression test.greeting() is identical to Test.greeting().
For that reason, there is no NullPointerException thrown at runtime.
reference: