Prepare for your Next Interview
This is a discussion on Differences Between Method and Function within the Java forums, part of the Software Development category; can any one explain clearly what is the difference between the Method and a Function, if possible by using some syntax and examples....
|
|||
|
Differences Between Method and Function
can any one explain clearly what is the difference between the Method and a Function, if possible by using some syntax and examples.
|
| The Following User Says Thank You to chaitu4u4ever For This Useful Post: | ||
| Sponsored Links |
|
|||
|
Re: Differences Between Method and Function
no difference according to me...
method is OO concept related to class i.e. function written for a class = method this is my wild guess... as per my knowledge it hardly makes any difference. |
|
|||
|
Re: Differences Between Method and Function
Hi,
method should declares and defines within the class only. so it has access controlling mechanism. used in oops. function declares and defines anywhere in the code. it has not access controlling. used in structured language. even behavior is same. thanks |
|
|||
|
Re: Differences Between Method and Function
hi,
In java function is call itself as a method.... there is not any difference in those thng.... it just using of terms...like in c++ we call it functins..and in java we call it as methods. In more simple terms Method does not take any arguement and it is invoked by method call whereas function may or may not take the arguements? Also Method does't return any thing but the function can return any thing Thanks Sushma |
|
|||
|
Re: Differences Between Method and Function
Hi,
method should declares and defines within the class only. so it has access controlling mechanism. used in oops. function declares and defines anywhere in the code. it has not access controlling. used in structured language. even behavior is same. thanks |
|
|||
|
Re: Differences Between Method and Function
Function and Method both are same. But if it is declared outside of class it is function and if it is declared within class that is method.
In case of C++ it will support both functions and methods But In case of Java there is no Functions concept only method is alloed. |
|
|||
|
Re: Differences Between Method and Function
Quote:
look friend, according to u method does not return any value is like a wrong concept because it returns the value in java. thanks |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Differences between SQL, SQL Server, My Sql, MS SQL? | chennaprashanth | SQL Server | 0 | 03-18-2008 05:01 AM |
| differences | chandanavemulapally | C and C++ | 3 | 12-19-2007 04:03 AM |
| differences between QTP & RFT | bvani | QTP | 1 | 09-05-2007 07:47 PM |
| Differences | pkishoreroy | Data Warehousing | 2 | 04-04-2007 12:29 AM |
| Differences Needed | fred | Web Design | 1 | 07-26-2006 04:54 PM |