View Single Post
  #2 (permalink)  
Old 01-02-2008, 08:59 PM
CaptainMorgan's Avatar
CaptainMorgan CaptainMorgan is offline
Moderator
 
Join Date: Dec 2007
Location: NewEngland, US
Posts: 841
CaptainMorgan will become famous soon enoughCaptainMorgan will become famous soon enough
Send a message via AIM to CaptainMorgan
Your code didn't compile for me either, but the following did:
Code:
public class Jupiter { public static void extractUsers() { System.out.println("Superclass output"); } } public class Moon extends Jupiter { public static void extractUsers() { System.out.println("Subclass output"); } }
You can't override a static method as you did above, but the above code I posted does work. I'm not sure about your abstract method because I don't see one.

EDIT: see here for great info on the matter.

Last edited by CaptainMorgan : 01-02-2008 at 09:11 PM.
Reply With Quote