Explain pass by reference and pass by value?

Answer Posted / aravind

Pass By Reference:
Passing the reference of the variable or object. In java
objects are passed by reference.

Pass By Value:
Passing the copy of the value. In java primitives are
passed by value.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is private public protected in java?

568


What is the purpose of using bufferedinputstream and bufferedoutputstream classes?

546


worst case complexities of Quick sort and Merge sort.

599


Can we convert integer to string in java?

594


How do singleton patterns work?

513






Why object class is super class for every class in java?

569


Explain differences between collection api and stream api?

610


Why inputstreamreader is used in java?

544


How many types of methods are there in java?

525


what is the significance of listiterator in java?

616


Can a main method be overloaded?

567


What happens if an exception is throws from an object's constructor?

625


what is mena by object block any what is the use of that

1770


What do you mean by of string::valueof expression in java 8?

539


Does .length start 0 java?

561