Home > Java > Java Tutorial > body text

What are java formal parameters

little bottle
Release: 2019-05-25 13:42:32
Original
7363 people have browsed it

Java is an object-oriented programming language. Java has the characteristics of simplicity, object-oriented, distributed, robustness, security, platform independence and portability, multi-threading, and dynamics. Let’s talk to you about what java formal parameters are.

What are java formal parameters

#The actual parameters of java refer to the parameters passed to the function when calling, that is, the value passed to the called function.

Actual parameters can be constants, variables, expressions, functions, etc. No matter what type of quantity the actual parameters are, they must have a certain value when making a function call. in order to pass these values ​​to the formal parameters.

The formal parameters of java refer to the parameters used when defining the function name and function body. The purpose is to receive the parameters passed in when calling the function.

The formal parameter is the independent variable of the function, and its initial value comes from the call of the function. Only when a function is called during program execution, can the formal parameters obtain specific values ​​and participate in calculations to obtain the function value.

The visible formal parameter list is equivalent to the variable description, but special attention should be paid: only type identifiers can be used here, and types cannot be used directly.

When calling a function, the actual parameters will be assigned to the formal parameters.

Therefore, we must pay attention to the number of actual parameters, the type should correspond one-to-one with the formal parameters, and must have a certain value.

The above is the detailed content of What are java formal parameters. 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 [email protected]
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!