aspose file tools*
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
Author

Exceptions in method signature

Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1511
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: 4240
    
    7

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: 1511
Thanks John and Mathew!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exceptions in method signature
 
Similar Threads
Quetion on inheritance
Throwing more than one application exception from a ejb interface
Core java
Exceptions Doubt
Is Return Type Included in Method Signature ?