In Java no matter if the variable is primitive datatype or an object when passed as an argument to a method, they are always passed by value.
This is a most common error that most of newcomers to language and even veterans do in understanding this concept.
Please go through to following link on java.sun.com website for a detailed discussion and understanding of this concept.


0 comments:
Post a Comment