wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Method Overloading Problem... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Method Overloading Problem..." Watch "Method Overloading Problem..." New topic
Author

Method Overloading Problem...

Ranji Sura
Ranch Hand

Joined: Oct 28, 2012
Posts: 84
Hi..

Please look at this..

http://docs.oracle.com/javase/specs/jls/se7/html/jls-8.html#jls-8.4.9

When a method is invoked (§15.12), the number of actual arguments (and any explicit type arguments) and the compile-time types of the arguments are used, at compile time, to determine the signature of the method that will be invoked (§15.12.2). If the method that is to be invoked is an instance method, the
actual method to be invoked will be determined at run-time, using dynamic method lookup (§15.12.4).


Can someone please explain these phrases...

01. the number of actual arguments (and any explicit type arguments)

what does it mean by "actual arguments" ?

02. If the method that is to be invoked is an instance method

Does it mean this by "instance method" , == method which is not static, method which belongs to object

Thank you...
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39478
    
  28
It means how many arguments are passed. myObject.foo(1, 2, 3, 4); has 4 arguments.
Yes, an instance method is a not‑static one.
Ranji Sura
Ranch Hand

Joined: Oct 28, 2012
Posts: 84
Thank you...
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39478
    
  28
You’re welcome :
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Method Overloading Problem...