English

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]

APPEARS IN

Dheeraj Mehrotra Computer Science [English] Class 12
Chapter 6 Variables and Expressions
SHORT ASSIGNMENTS | Q 35. (i) | Page 136
Advertisements
Share
Notifications



      Forgot password?
Use app×