This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes method calling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "method calling" Watch "method calling" New topic
Author

method calling

kiruthiga arumugam
Greenhorn

Joined: Sep 29, 2008
Posts: 8
hi to all
I m having few doubts...
1.In the case of overriding static mehod of super class in sub class
while calling the same method in the subclass with the object of of type superclass.....which method will be called???

2.what is the order of compilation in java programming?

3.
//method in the super class

public void methodA(){};

//method in the sub class

void methodA(){};

Are these two are different methods??


Thanks in advance....please clarrify my doubts.....
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

1. See Overriding vs. Hiding.

2. I'm not sure what this means. Could you be more specific?

3. If you test this, the compiler will generate an error explaining why you can't do this.


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Pramod P Deore
Ranch Hand

Joined: Jul 15, 2008
Posts: 629

you cannot override static methods.


Life is easy because we write the source code.....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: method calling
 
Similar Threads
Differance in overriding variable and method
Strange "this" behavior
Casting of Reference
Constructor
Regarding Method Shadowing