File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes method invocation 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 » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "method invocation" Watch "method invocation" New topic
Author

method invocation

Shiva Mohan
Ranch Hand

Joined: Jan 05, 2006
Posts: 465



in line1,Photos.test(Photos) gets accessed.actaully Photos class having two methods namely test(A a) and test(B b) .
i thought Photos.test(Photos) call only invoke test(B b).Photos.test(Photos) invoking test(A a) which makes no sense Since A is the superclass.But i got the result "B - public void test(A )
".How?Any help....
Priya Viswam
Ranch Hand

Joined: Dec 28, 2006
Posts: 81
Please provide the source code for B.java


SCJP 1.5<br />SCWCD 1.4
Shiva Mohan
Ranch Hand

Joined: Jan 05, 2006
Posts: 465
Hi Priya,

You really helped me to understand where i was going wrong.Actaully B class
had to change to Photos.After i changed ,everything is working properly as i thought.

Thanks for the help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: method invocation
 
Similar Threads
Runtime
Method Overloading Question
overloading
Please explain the output of code below
var args method