posted 10 years ago
Your comments on line 4 are correct; that's the first line of the definition of the method makeRange, which takes two ints and returns an array of ints.
Your comments on line 5 are also correct. There, a local variable 'range' is created, which is initialized with a new array of ints, with (upper - lower) + 1 elements (nitpick: not "number of arrays", but "number of elements" - there's only one array).
Line 14: Here, a local variable 'range' in the main method is declared. It's not initialized. Nothing is copied here. Note that this local variable is completely separate from the local variable in the method makeRange (line 4).
Line 17: The method makeRange is called, and the return value is assigned to the variable 'range' that was declared in line 14. Nothing is being defined on that line.
One thing that's important to learn to see is that { and } delimit the scope of variables. Variables declared inside a pair of { and } exist only from the point that they are declared until the closing }. So, the variable 'range' in line 5 exists only until line 11 (the makeRange method), and the variable 'range' in line 14 exists until line 24 (the main method).