Re: Overriding Static Methods
From: Chris Smith (cdsmith_at_twu.net)
Date: 05/24/04
- Next message: Joona I Palaste: "Re: Patents Unleashed and the future of Java Programming"
- Previous message: William Brogden: "Re: Design issue"
- In reply to: Ken Kafieh: "Re: Overriding Static Methods"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 24 May 2004 06:57:47 -0600
Ken Kafieh wrote:
> no matter what I do I cant seem to get to paste the code into a message.
>
> I placed the code on a URL. here it is...
>
> http://24.156.35.62/code.htm
Okay,
It's hard to get a clear picture of what is or is not an acceptable
solution to you. You aren't going to get polymorphism from a static
method, since they can't be overridden and there's no object to use as
the basis for dispatch anyway. So while it would work if you called the
method unambiguously as "ClassB.method1()" instead of just "method1()",
that's probably not what you have in mind.
Your best bet is to use instance methods as you did in the second
example.
-- www.designacourse.com The Easiest Way to Train Anyone... Anywhere. Chris Smith - Lead Software Developer/Technical Trainer MindIQ Corporation
- Next message: Joona I Palaste: "Re: Patents Unleashed and the future of Java Programming"
- Previous message: William Brogden: "Re: Design issue"
- In reply to: Ken Kafieh: "Re: Overriding Static Methods"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|