is java support call by reference and call by value, if
supports please explain?

Answer Posted / renjit mathew

ya java support both.In java when u pass a single type to a
method it passes by value.


Call By Reference:-In java objects are passed by
reference.when you create a variable of a class type,you are
only creating a reference to an object.when you pass this
object to a method the parameter that receives it will refer
to the same object as that refered by the argument

Is This Answer Correct ?    9 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain differences between checked and unchecked exceptions in java?

841


Can subclass overriding method declare an exception if parent class method doesn't throw an exception?

754


Give the difference between the println method and sqrt method?

841


Can an unreferenced object be referenced again?

944


What is passing by reference in java?

764


Are arrays primitive data types?

852


Why do I need to declare the type of a variable in java?

776


How do you sort a string in java?

730


Is java se free?

710


What is immutable in java?

770


What are thread local variables?

774


Print Vertical traversal of a Binary Tree.

800


How many types of string data types are there?

758


What is void data type?

757


What is a type parameter in java?

756