aspose file tools*
The moose likes Beginning Java and the fly likes Where method overloading sequence has refereed in JLS ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Where method overloading sequence has refereed in JLS ?" Watch "Where method overloading sequence has refereed in JLS ?" New topic
Author

Where method overloading sequence has refereed in JLS ?

Ranji Sura
Ranch Hand

Joined: Oct 28, 2012
Posts: 84
Hi, I am still learning java. I have got this code in my class. I want to learn more about this what I have already learned from my class, so I searched for JLS ?

Now, what I want to know is, Where is in the JLS, I can find sequence of overloading methods when we call them or something similar to that ?
Please help...
Thank you.
Ranjith Suranga.
Ranji Sura
Ranch Hand

Joined: Oct 28, 2012
Posts: 84
Hi, I have just found this in JLS. http://docs.oracle.com/javase/specs/jls/se7/html/jls-8.html#jls-8.4.9

But , I can't get a good idea, can some one please explain...

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).


Thank you.
Ranjith Suranga
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3739
    
  16
Ranjith Suranga wrote:But , I can't get a good idea, can some one please explain...

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).

It would help if you told us which part you didn't understand. Most of that quote seems fairly straightforward.

Joanne
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39884
    
  28
I presume by “refereed” you meant “referenced”.
I searched for that very same thing myself earlier this week: I found 4 hits, which are listed in this post.
Ranji Sura
Ranch Hand

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

Joined: Oct 13, 2005
Posts: 39884
    
  28
You’re welcome
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Where method overloading sequence has refereed in JLS ?