Explain pass by reference and pass by value?

Answer Posted / chinmay

passing the value instead of reference is known as pass by value,here primitive data should be given...
now pass by reference
Demo d=new Demo("abc");
Demo c=b;
here we pass the reference instead of value..
it is called pass by reference

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by class loader? How many types are there?

678


What is the symbol for average?

524


What is java jit compilers?

562


What is flag in python?

557


What are the steps involved to create a bean?

685






Can we use both this () and super () in a constructor?

556


How many bits is a boolean?

628


Is java an open source?

530


Which is faster set or list in java?

536


Why are there no global variables in java?

587


What kind of variables can a class consist?

595


Is final static java?

553


Which collection is sorted in java?

552


Explain about object oriented programming and its features?

601


What do you mean by constant time complexity?

604