permaculture playing cards
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Exceptions in method signature Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Exceptions in method signature" Watch "Exceptions in method signature" New topic

Exceptions in method signature

Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1599
Does method 'signature' includes or excludes exceptions?

Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
John Jai

Joined: May 31, 2011
Posts: 1776
From the JLS

8.4.2 Method Signature

The signature of a method consists of the name of the method and the number and types of formal parameters to the method. A class may not declare two methods with the same signature, or a compile-time error occurs.

Matthew Brown

Joined: Apr 06, 2010
Posts: 4544

If the signature included exceptions, you'd be able to do this without a compiler error because the two methods would have different signatures:
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1599
Thanks John and Mathew!
I agree. Here's the link:
subject: Exceptions in method signature
It's not a secret anymore!