• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Method Overloading Problem...

 
Ranji Sura
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 48382
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you...
 
Campbell Ritchie
Sheriff
Posts: 48382
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You’re welcome :
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic