This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Method Signature Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Method Signature" Watch "Method Signature" New topic

Method Signature

Vijay Jagannathan

Joined: Feb 17, 2003
Posts: 22
Hello Ranchers,

I have been given to understand that a method signature consists of:
1> Name of the method
2> The parameter list of the method

and that the return type is not a part of this. Can you tell me if the "throws clause" is a part of the method signature?

Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24189

No, it's not. The term "method signature", as used in describing method overloading, includes neither the return type nor the exception declarations. Interestingly, the JVM internally refers to a method using a descriptor that does include the return type -- but still doesn't include the exceptions.

[Jess in Action][AskingGoodQuestions]
Vijay Jagannathan

Joined: Feb 17, 2003
Posts: 22
Thank you very much for clarifying this
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Method Signature
It's not a secret anymore!