/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package myproject;
/**
*
* @author User
*/
Type: Posts; User: jps
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package myproject;
/**
*
* @author User
*/
Don't just try in one method, comment the lines with new in both doit and f, and run it.
My advice is to comment the line in question, run it, and see what happens. Post back if you have questions after a little trial and discovery.
..an addon to my previous post. When you passed a to doit, var your original array with five zeros in it becomes lost. So it is important to realize you did not modify a in the sense that the loop in...
Correct. However, you have not compared apples to apples.
Function doit(int[] var) does not modify array a either. Your difference lies in your calls.
a=doIt(a);
f(b);The first line,...