Either use the Arrays.toString() method, or use a for loop to build up or display your string.
Type: Posts; User: pbrockway2
Either use the Arrays.toString() method, or use a for loop to build up or display your string.
ToyExample eg = new ToyExample(666);
Date[] arr = eg.getDateArray();
arr[42] = new Date(); // this will *not* change the array entry in the ToyExample instance
In fact it is on line 23 that they create the new object they will return (temp). The for loop is used to populate this new array with new Date objects.
The reason is so that the caller does not...