Formal parameters are used in the definition of methods or subprograms.
Actual parameters are used to call the methods or subprograms.
public void add(int a, int b) // formal parameters
{
return a+b;
}
...
System.out.println("sum=" + sum(p,q)); // actual parameters (p,q)
diff between actual and formal parameter
1 answer