What is the use of method in Java?
I'll answer
Earn 20 gold coins for an accepted answer.20
Earn 20 gold coins for an accepted answer.
40more
40more
Works at the International Monetary Fund, Lives in Washington, D.C., USA.
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.
2023-05-15 12:30:14
评论(499)
Helpful(122)
Helpful
Helpful(2)

Chloe Lewis
QuesHub.com delivers expert answers and knowledge to you.
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.