Click to See Complete Forum and Search --> : java signature question
vb_student
Sep 20th, 2006, 12:55 PM
in the following signature
public string getrecord(int key)
isn't public string part of the signature. i read in an article that the signature comprises of the method name(getrecord) and trhe paramater list((int key))
CornedBee
Sep 20th, 2006, 01:24 PM
The article is correct, except that the name of the parameter plays no part in the signature. The above method has the signature getrecord(int).
vb_student
Sep 20th, 2006, 03:31 PM
so the return type (string) & access is not part of the signature?
CornedBee
Sep 20th, 2006, 03:38 PM
Exactly.
The signature is the part that decides which function actually gets called from any piece of code. Thus, the containing class is piece of the signature, the function name (obviously), and the parameters. You cannot overload on return type or access type. I'm not sure if static or not is considered, though. I don't think it is.
vb_student
Sep 20th, 2006, 03:42 PM
pearls of wisdom, now i understand what a signature really is
thanks cornedbee
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.