[SOLVED] So, I was trying to make an example of function Pass by Reference in java... But it shows me error | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

[SOLVED] So, I was trying to make an example of function Pass by Reference in java... But it shows me error

https://code.sololearn.com/czAHmXXtct73/?ref=app

22nd Aug 2022, 2:33 PM
Ananya | Inactive |
Ananya | Inactive | - avatar
2 Answers
+ 2
Variable 'a' is local main method variable. Not instance variable of pro class. Declare 'a' outside main method, and in class level scope.
22nd Aug 2022, 2:49 PM
Jayakrishna 🇮🇳
22nd Aug 2022, 2:50 PM
Ananya | Inactive |
Ananya | Inactive | - avatar