3 User Defined Methods
3 User Defined Methods
FUNCTION DEFINITION
The general form of a function definition is as PASS BY VALUE
given below : The pass by value method copies the values of
[access-specifier] [modifier] return-type func- actual parameters into the formal parameters,
tion-name (parameter list) i.e., the function makes its own copy of argument
{ values and use them, thus original argument values
body of the function does not changes. In Java all primitive data types
} are passed by value.