| Author |
what is method signatur in java
|
kiran kumar
Greenhorn
Joined: Feb 07, 2005
Posts: 29
|
|
hi what is method signature in java? method signature consists of different arguments and return type also?
|
 |
Priya Jothi
Ranch Hand
Joined: Jul 13, 2004
Posts: 168
|
|
Hi, Method signature in java is simply a method name followed by argument list(if any).This does not include the return type. For example consider the method public void methodA(int a,int b); method signature for the above method is <b>methodA(a,b)</b>. assuming data type of a & b is int or a narrower type convertible to an int. Thanks, Priya.
|
 |
fred rosenberger
lowercase baba
Bartender
Joined: Oct 02, 2003
Posts: 9956
|
|
the method signiature actually includes the TYPES of the arguemnts passed... methodA(int a, int b) this allows the compiler to recognize the difference between that and methodA(String a, int b) [ June 24, 2005: Message edited by: fred rosenberger ]
|
Never ascribe to malice that which can be adequately explained by stupidity.
|
 |
Joel McNary
Bartender
Joined: Aug 20, 2001
Posts: 1815
|
|
kiran: I note that you have recently changed your display name. However, your new name does not comply with the JavaRanch Naming Policy. Please Change your display name to comply. (We are looking for a first and last name; preferably your own, but one that is at least not obviously fictitious.)
|
Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
|
 |
 |
|
|
subject: what is method signatur in java
|
|
|