Computer Science, asked by varsha1108, 11 months ago

can anyone explain me what is user-defined methods​


amvvan: Hi
akhilarul324: hi can u send friend request to me

Answers

Answered by Anonymous
3

> 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.....


varsha1108: I don't want from Google
varsha1108: coz it's already there in my book
amvvan: Ok
amvvan: Why you ask the question
Answered by akhilarul324
0

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


akhilarul324: this is not from google i typed with my hand
akhilarul324: ok
akhilarul324: if u r in fb then ask your doubt to me in user name AKHIL ARUL
Similar questions