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
Difference between class#getinstance() and new operator ?
How arrays are stored in memory in java?
What is the maximum size of hashmap in java?
What is getkey () in java?
What are daemon Threads in java?
Differentiate between stringbuffer and string?
What is a protected method?
What is array length?
What are basic keywords?
Explain creating threads by extending thread class ?
What is the old name of java?
Explain when we should make an instance variable private.
In java, what is the difference between method overloading and method overriding?
Can sleep() method causes another thread to sleep?
Is finalize() similar to a destructor?