aspose file tools*
The moose likes Beginning Java and the fly likes what is method signatur in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
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: 11499
    
  16

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 ]

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Joel McNary
Bartender

Joined: Aug 20, 2001
Posts: 1824

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