Computer Science, asked by aryan4025, 1 year ago

what are functions or methods___in java ???​

Answers

Answered by adityasi
0

Answer:

A function is a piece of code that is called by name. It can be passed data to operate and can optionally return data.

A method is a piece of code that is called by a name that is associated with an object.

Answered by vmbashkalp2980
0

Explanation:

A method is a set of code which is referred to by name and can be called (invoked) at any point in a program simply by utilizing the method's name. Think of a method as a subprogram that acts on data and often returns a value. Each method has its own name.

Similar questions