Answer in Java | JSP | JSF for LEBENIS #125074
January 22nd, 2023
Parameters are used to provide some external data for a method. A formal parameter is a variable in a function definition, while an actual parameter is an actual input at function call.
The next Java code illustrates formal and actual parameters:
class Main
{
// The parameter in the function definition is a formal one
public static void method(int formalParameter) { }
public static void main(String[] args)
{
// The next variable that is passed to the method is an actual parameter
int actualParameter = 5;
method(actualParameter);
}
}
See more here: