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
How many bits is a float?
Why is stringbuffer thread safe?
How many inner classes can a class have?
How hashmap works in java?
What is string builder?
How do you do exponents in java?
How to create packages in java?
Is singleton set an interval?
How does queue work in java?
What is use of static method?
What does snprintf return?
What is currentthread()?
there are N number of matchboxes numbered 1...N.each matchbox contain various number of stick.Two player can alternatevely pick some amount of stick from the higest stick containing box . The player is condidered win if there is no stick after his move.Find the final move so that the move player win. Note:In case the number of stick is equal ,pick the stick from the higest numbered box.
Is age a discrete variable?
What are disadvantages of java?