Home > Java > javaTutorial > How to call method in Java

How to call method in Java

silencement
Release: 2019-05-30 17:54:45
Original
3860 people have browsed it

How to call method in Java

Before calling a method, you must first know what a method is.

A Java method is a collection of statements that together perform a function.

A method is an ordered combination of steps to solve a type of problem

Methods are contained in a class or object

Methods are created in the program and elsewhere Quoted

java method call

Java supports two ways of calling methods, which are chosen based on whether the method returns a value.

When a program calls a method, control of the program is given to the called method. Control is returned to the program when the return statement of the called method is executed or the method body closing bracket is reached.

When a method returns a value, the method call is usually treated as a value.

The above is the detailed content of How to call method in Java. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template