Javatpoint Logo

what is call by value in an array?

By: tsaish*** On: Sat Nov 30 12:56:17 EST 2013     Question Reputation6 Answer Reputation0 Quiz Belt Series Points0  6Blank User
can i get a program to explain call by value in an arrayUp0Down

 
Call by value means that when you pass an argument in java it's a copy of the original value that is passed not the original object. It's the default function for all build-in objects (char, int, float, double etc) meaning that if you use a function and its argument is of build-in type you cannot change the value of the argument.

An array can be passed to a function by value by declaring in the called function the array name with square brackets ([ and ]) attached to the end. When calling the function, simply pass the address of the array (that is, the array?s name) to the called function.
Image Created5Down

By: [email protected] On: Sun Dec 01 02:41:30 EST 2013 Question Reputation0 Answer Reputation359 Belt Series Points0 359User Image
Are You Satisfied :0Yes0No