Domanda di colloquio di Mphasis

overriding the Static method ? SuperClass sc = new SubClass() ; sc.getMethod() ? // calling overrided static method , Which class method it will execute ?

Risposta di colloquio

Anonimo

29 lug 2011

It will execute Superclass method only, because method is declared as Static. and java will decide the method to execute at compile time only.