Question d’entretien chez Mphasis

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

Réponse à la question d'entretien

Utilisateur anonyme

29 juil. 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.