can anyone explain me what is user-defined methods
Answers
> A Java method is a set of statements that are grouped together to perform an operation. > Methods are also known as Functions. > In Structured programming (ex: C Language) we use Functions (Built in and User defined) > In Object Oriented Programming we use Methods (Built in and User defined).
PLEASE FOLLOW ME.....
Answer:
see down your answer
Explanation:
method is a collection of statements that are grouped together to perform an operation. When you call the System.out.println() method, for example, the system actually executes several statements in order to display a message on the console.
public static int[any data type] methodName(any name)(int a, int b)
{
// body
}
Here,
public static − modifier
int − return type
methodName − name of the method
a, b − formal parameters
int a, int b − list of parameters and u can use infinite a,b,c,d,e,f......so on
this is for pure function(has no return value)
and for impure function(has return value)
we use void in impure function
syntax is
public static void methodName[any name]()
{
body///
}
ok for anymore explanation u can give me friend request in brainly and u can ask me in messages
and in fb by username
AKHIL ARUL
https://www.facebook.com/profile.php?id=100010873237198