aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Signature question 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 "Signature question" Watch "Signature question" New topic
Author

Signature question

Anup Engineer
Ranch Hand

Joined: Mar 04, 2002
Posts: 48
Question from the mock exam at
http://www.javacaps.com/scjp_mockexams1.html
6. Which of the statements are true?
A) Overridden methods have the same method name and signature
B) Overloaded methods have the same method name and signature
C) Overridden methods have the same method name and different signature
D) Overloaded methods have the same method name and different signature
I thought only D) was true, but it also says A) is true. If the overridden method can have a different thrown exception (though it has to be a subclass of the exception thrown by the base) is it still the same signature?
What exactly constitutes a signature?
Thanks!


Anup Engineer
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
From 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.


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Signature question