aspose file tools*
The moose likes Beginning Java and the fly likes static method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "static method" Watch "static method" New topic
Author

static method

Praveen Ravinuthala
Greenhorn

Joined: Aug 28, 2012
Posts: 7
when we override static method in subclass,

if we use polymorphism to call to subclass method through super class reference ,the super class static method will be executed.But when we create object separately for subclass and subclass static method called by using object,then subclass will be executed.why?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36514
    
  16
You can’t override static methods. Start with this FAQ.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: static method
 
Similar Threads
Static Method Inheritance
instance doubt
static methods-overridden
Are these statements true?
Please clarify my doubts about static methods