What are method parameters in Java?
Advertisements
Question
What are method parameters in Java?
Short Answer
Advertisements
Solution
Method parameters in Java are variables declared within the parentheses of a method definition. They are used to receive values passed to the method when it is called. These parameters act as local variables and can be accessed only within the method in which they are declared.
shaalaa.com
Is there an error in this question or solution?
Chapter 6: Variables and Expressions - SHORT ASSIGNMENTS [Page 136]
