-
methods
what is method signature ? write a simple program c=a+b by using method signature?
-
You can't ... because a signature is only part of writing a method.
A method's "signature" is its declaration:
public int calcC( int a, int b)
it tells the user that in order to calculate C, you pass the calcC method two int arguments, and the method returns an int value to the calling method.
If your user's only knowledge of this method is its signature, she knows how to use it. In this way, it is a part of the "interface" to your class. Take a look at the Java API documentation - each class's Javadocs content includes the signatures of the methods, not the body or definition of the methods.
The programmer still needs to define the method - to write the series of statements which carry out this calcC. This can remain hidden or obscured - the user doesn't need to know the implementation details in order to use the method.
Last edited by nspils; 04-25-2006 at 07:54 AM.
Similar Threads
-
Replies: 2
Last Post: 10-13-2005, 11:16 AM
-
By ericelysia1 in forum Java
Replies: 34
Last Post: 05-15-2005, 06:39 PM
-
Replies: 2
Last Post: 05-03-2005, 05:52 AM
-
By Larry Hayashi in forum Architecture and Design
Replies: 2
Last Post: 05-01-2003, 11:33 AM
-
By Frank Oquendo in forum .NET
Replies: 0
Last Post: 07-24-2002, 01:41 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks