Explain pass by reference and pass by value?

Answer Posted / vikas

Pass-by-value means, Passing a copy of the value.
Pass-by-reference means, instead of passing the actual
value, the address(of the value) is passed.

Is This Answer Correct ?    18 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is flush buffer?

506


How will you calculate the depth of a binary tree if the tree contains 15 nodes?

587


I have multiple constructors defined in a class. Is it possible to call a constructor from another constructor’s body?

576


What is jar?

623


What is meant by interface?

554






What is the main functionality of the remote reference layer?

1403


Can we restart a dead thread in java?

537


What are the two ways in which thread can be created?

580


What is casting in java programming?

566


What are the types of inner classes (non-static nested class) used in java?

547


What is constructor and virtual function? Can we call a virtual function in a constructor?

666


What is an object's lock and which object's have locks in java programming?

551


What is comparable and comparator interface? List their differences

570


How to read and write image from a file ?

542


What is heterogeneous in java?

478