What is the difference between function and method?
functions have independent existence means they are defined outside of the class e.g. in c main() is a function while methods do not have independent existence they are always defined inside class e.g. main() in Java is called method.
No comments:
Post a Comment