This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes how a class can call methods using super Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "how a class can call methods using super" Watch "how a class can call methods using super" New topic
Author

how a class can call methods using super

sham shalem
Greenhorn

Joined: Sep 21, 2008
Posts: 1
hi friends, if my application has 50 classes. All classes has method called display(), then how i can call the first class in 50 class using 'super'.
[ September 26, 2008: Message edited by: sham shalem ]
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19232

You can only go "up" one level. So if you have class A, class B extends A and class C extends B, then class C cannot "super" back to class A, only to B.


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
 
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 a class can call methods using super
 
Similar Threads
doubt in constructors?
userdefined Exception Class
hide vs override
Inheritance Issue
class Object