Why method - Using this we can do implementation.
Why to use methods to do implementation - Method has inbuilt functionalities to execute our implementation. Syntax -
returntype hello()
{
----
----
}
Method is a set of block(execution block, implementation block) which is used to perform programmers task/implementation, and this method return output in the form of return type specification.
Note - In programming we have two types of methods-
- Predefined method means that method name, implementation all existed.
- User-defined method means method name, implementations, which we have to define.
No comments:
Post a Comment