+ 2

Is Java "Pass-By-Refrence" Or "Pass-By-Value"?

31st Jul 2019, 12:48 PM
Darakhshan Maheen
Darakhshan Maheen - avatar
2 Answers
+ 1
Java is "Pass-by-value"
31st Jul 2019, 12:50 PM
Sufyan Aquib
Sufyan Aquib - avatar
+ 1
JAVA is 'Pass by value' Sometimes while using objects as parameters, one can get confused that how JAVA is using 'Pass by reference technique' but in reality Reference or address is copied to the new object. This new object then is used as a reference to access the attributes and behavior of that specific class.
1st Aug 2019, 8:16 PM
HITESH AHUJA
HITESH AHUJA - avatar