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

How to create an immutable class?

566


Explain what access modifiers can be used for methods?

566


Why collection is called framework in java?

538


What is the difference between preparedstatement and statement in java?

547


What is the difference between iterator and enumeration ?

510






What is meant by anonymous class?

587


Describe string intern() methodology

592


How can we make a class singleton?

570


Why arraylist is not synchronized in java example?

465


What is an example of a constant variable?

526


What is the reason behind using constructors and destructors?

553


How do I print a “?

569


What is the difference between logical data independence and physical data independence?

531


Is space a string in java?

508


What is the difference between hashmap and hashtable in java?

553