This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Exceptions in method signature Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "Exceptions in method signature" Watch "Exceptions in method signature" New topic
Author

Exceptions in method signature

Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1493
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
Bartender

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
Bartender

Joined: Apr 06, 2010
Posts: 3791
    
    1

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: 1493
Thanks John and Mathew!
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Exceptions in method signature
 
Similar Threads
Quetion on inheritance
Throwing more than one application exception from a ejb interface
Exceptions Doubt
Is Return Type Included in Method Signature ?
Core java