jQuery in Action, 2nd edition
The moose likes Beginning Java and the fly likes how to using the methods of superclass? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "how to using the methods of superclass?" Watch "how to using the methods of superclass?" New topic
Author

how to using the methods of superclass?

Ronald.H
Greenhorn

Joined: Mar 23, 2004
Posts: 1
There are three classes: A,B,C
code:
------------------------------
class A{
void method(){}
}
class B extends A{
void method(){}
}
public class C extends B{
void method(){}
}
------------------------------
In class C, I can use the method "method()" of B by using "super.method()".
How can i directly use the method "method()" of A except to declare it static??
Carlos Failde
Ranch Hand

Joined: Oct 20, 2000
Posts: 84
Howdy. There was a thread about this one ... found it:
super.super.method()
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Ronald.H,
Welcome to JavaRanch!
We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.
We'd like display names of the format FIRST_NAME + SPACE + LAST_NAME. We'd also like more than a single character be used for the LAST_NAME.
Thanks Pardner! Hope to see you 'round the Ranch!


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: how to using the methods of superclass?
 
Similar Threads
A question about sibling class
Need "super" keyword understanding
Accessing the base class methods in child class.
Accessing methods in super super class
Code call (Inheritance)