Method Call by value and reference

  • Eclipse: Oxygen
  • Java: 1.8

This tutorial deals with a call by value and reference. While passing a value to function outside the main function, the value in the main function remains unchanged as there is no actual change in the value in the desired memory location. By while passing the value by reference, (such as we passes a pointer to the memory location in C) we can pan the array (which by default passes the address) so that the change can be seen in the variable.

Output

Salim
John
Steve
Pooja
Rahul
*************
Salim

Contributed by Poonam Tomar


VIEW COURSES

Buy me a coffee!

 

PayTM QR (INDIA)

  • Get video tutorials
  • Project files set
  • Get┬áCertified

Leave a Reply

avatar
  Subscribe  
Notify of
Close Menu