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
Java openings 3 - 5 years, Lnt Infotech. requirements - core java, J2ee, struts, hibernate Interview Date:- 19 March 2011 Time:- 9:00 AM to 12:00 Pm Interview Location - L & T Infotech, Manapakkam, Chennai Refererral PS NO:- 291649 (Please mention this when u fill the form only then u will be considered for interview) Documents Required:- Latest Resume, Photograph and last 3 payslips Mail me on vasan2211@gmail.com once u appear for interview
What are three types of loops in java?
What do you mean by constant time complexity?
How many types of string data types are there?
Why we use multi threading instead of multiprocessing?
When do we use synchronized methods in java?
What is thread life cycle?
Is it possible for a yielded thread to get chance for its execution again?
What is the difference between replace and replace all?
What restrictions are placed on method overriding in java programming?
What is the difference between the jdk 1.02 event model and the event-delegation model introduced with jdk 1.1?
What are the types of sockets in java?
What is a singleton puppy?
What is a lock or purpose of locks in java?
How can we break singleton in java?