filmov
tv
Java Programming 1 - Passing Arrays to Methods
Показать описание
I go over arrays and how arrays are passed to methods as references and not by their values. Unlike primitive data types, arrays are reference type and thus their references (memory addresses) are always passed to methods. Primitive data types are always and only passed by values, never by reference in Java. The good thing is that any changes within the method also change the original array. The bad thing is the same reason - so be cautious.