|
Can parameters also be primitive types, like int? A good answer might be:Yes. | |
Primitive ParametersOften parameters are used to "fine-tune" the actions performed by a method. For example, say that you wanted to print out only some of the elements of an array. Here is the ArrayOps class definition with a new method added:
The new method printRange() is to print out the elements from start to end (inclusive.) For example, the main() method asks to print out the elements from 1 to 5 (inclusive.) Assume that the user will never ask to print out elements that are not there. | |
QUESTION 8:Fill in the blanks so that printRange() works. Click Here after you have answered the question |