Java – Methods: Passing Arrays vs Elements of an Array

Java – Methods: Passing Arrays vs Elements of an Array

This is a whiteboard talk showing how to pass an array into a Java method. Both the method signature line is shown as well as the line of code that would call the method. A comparison is made showing the difference between sending an entire array (or a memory address pointer to the array) to the method and sending a single entry from the array to the method.