my dog learned polymorphism
The moose likes Beginning Java and the fly likes what is method signatur in java Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "what is method signatur in java" Watch "what is method signatur in java" New topic
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
    
    6

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what is method signatur in java
 
Similar Threads
Method signature
Method Signature
Java Signature
java.lang.reflect.Method, method.invoke(...) problem
generic, self test example