File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
JavaRanch » Java Forums » Java » Java in General
Bookmark "over riding" Watch "over riding" New topic
Author

over riding

raj joe
Ranch Hand

Joined: Mar 17, 2005
Posts: 99
Class MyClass
{

public static meth1()
{
System.out.pritln("parent");
}

}

Class Child extends MyClass
{
public static meth1()
{
System.out.pritln("child");
}

}

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
Marshal

Joined: Jul 08, 2003
Posts: 24166
    
  30

You can't override static methods.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: over riding
 
Similar Threads
overloading overridden
Parent class -> Child class
OverLoading
Overriding methods of interface possible ?
Synchronization problem