Computer Science, asked by saraswatdivyam, 10 months ago

what is the synatx of method in java

Answers

Answered by queensp73
1

Answer:

A method in Java is a set of instructions that can be called for execution using the method name. A Java method can take in data or parameters and return a value - both parameters and return values are optional. Methods can be public, private or protected.

Explanation:

hope it helps u

:)

Answered by mikun24
0

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

Similar questions