Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

over riding  RSS feed

 
raj joe
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!