Incorrect answer to quesiton,
March 24, 2008 at 2:37 AM
Your answer to this quesiton is incorrect.
Question: How is an argument passed in java, by copy or by reference
Answer: If the variable is primitive datatype then it is passed by copy. If the variable is an object then it is passed by reference
In java arguements are always passed by value. If it is an object that is being passed it really is the address of the object being passed by value. If you set the object to null inside of the called method it will not be set to null in the calling module thus it is not passed by reference.
View All Comments