Hi, I think there is more to tell about passing by value on Java. Primitives are all passed by value. For arrays and objects, we are passing *BY VALUE* a *copy of the reference*of the object or array. Because we are passing a copy, *modifying a reference inside function have no effect*, but *modifying the object or array pointed by reference inside function* *does have effect*.
Very nice explanation here http://academic.regis.edu/dbahr/GeneralPages/IntroToProgramming/JavaPassByValue.htm With less examples, but very clear you can read in Java Tutorial also http://java.sun.com/docs/books/tutorial/java/javaOO/arguments.html --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en -~----------~----~----~----~------~----~------~--~---
