Asked by computer
diff between actual and formal parameter
Answers
Answered by
MathMate
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)
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)
There are no AI answers yet. The ability to request AI answers is coming soon!
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.