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 difference between path and classpath?

556


What are implicit objects in java?

549


Can static methods access instance variables in java?

569


What are access specifiers in java ?

588


Why for each loop is used?

500






What is object in java?

530


What are the features of java?

529


Write a program to print fibonacci series

610


What is the maximum size of list in java?

541


What is the difference between stored procedure & function?

548


what is a green thread? : Java thread

571


Why should I use abstract class?

562


what is the messsage u r going to get from an objectoriented programing?

1609


Explain java heap space and garbage collection?

580


What is a default constructor and also define copy contrucyor?

595