It's not a secret anymore!
The moose likes Java in General and the fly likes getMethod Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "getMethod" Watch "getMethod" New topic


sun par
Ranch Hand

Joined: Oct 03, 2002
Posts: 257

I understand thru the api that name refers to method name, but what is the purpose of parameterTypes??

Sunita<br />SCJP 1.4
Mark Fabrizio

Joined: Mar 31, 2003
Posts: 7
I'm not sure, but I think that the Class[] parameters array is to distinguish between methods that might have the same name, but different arguments. I'm not sure if these have to be in the order declared in the method or not.
Junilu Lacar

Joined: Feb 26, 2001
Posts: 6529

Yes, they are; and yes, they do.
I agree. Here's the link:
subject: getMethod
It's not a secret anymore!