This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
 
Similar Threads
Overriding and Exceptions
GC again ??
Questions for you
JavaCaps Mock exam
Overloading Signature