In: Computer Science
1.Void method:
Void method means the method which returns nothing after its execution. For instance we have a method which takes two integers and prints the sum of those two then we can write method with a void type.
public static void function_name(int x, int y)
{
}
This method takes two integers , but will not return anything becasue it has return type void.
2. Pass by value:
Pass by value means , passing the values to the method may have two types pass by value or pass by reference. In pass by value we will send the values of the variables to the called function. In pass by reference it takes an address. mainly it points to the address of the other variabe. When you send values by pass by value , the original data wil not be modified. Dummy data will be created for the called function. In case of call by refence , we will send the addresses of the varible to the method , this variable value can be modified.
3.Scope:
The life span of a variable is known as scope of a variable. Generally scope of the variable wil be within the braces.
public static void method()
{
int n; //scope of n begins
}//Scope of n ends here.
4.Overloaded Method:
Overloading means that the same method name can be defined with more than one signature. Overloading means different things in different languages.