Now I am going to give a definition of method in programmatically.
Method-> In programming languages set of statementthat is written inside a block {} and used to perform a specific task is callled method.
In other words any task that is performed by object is called method or behaviour of an object .
Suppose you have ability to talk ,write,and move read all these are your behavior.
Now how to write a method in programing language ?
Syntax-
{
//Set of statement that has a spedific task..
}
Now a short Example ->
public void Add() //this is an Add method
{
res=num1+num2 //instruction that is written here
}