wood burning stoves
The moose likes Java in General and the fly likes over riding Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "over riding" Watch "over riding" New topic

over riding

raj joe
Ranch Hand

Joined: Mar 17, 2005
Posts: 99
Class MyClass

public static meth1()


Class Child extends MyClass
public static meth1()


The out put is Parent.where as i have overridden the meth1 in child class.What exactly happens when i override static method.
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

You can't override static methods.

[Jess in Action][AskingGoodQuestions]
I agree. Here's the link: http://aspose.com/file-tools
subject: over riding
It's not a secret anymore!