This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

over riding

 
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
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic