Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Need to override static method...

807605Aug 6 2007 — edited Aug 6 2007
Hi,

I have the following class:

Class BaseClass {

public static void methodA () {
.
.
tempInt = method1();
.
.
}

protected static int method1() {
.
.
}
}

In the above class, note that both the methods are 'static'.
I want to override "method1()" so that from "methodA()", the overridden method "methodA()" is called instead of base class's.

Is there some way I can achieve this?

Thanks,
Sandeep
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 3 2007
Added on Aug 6 2007
2 comments
353 views