Assignment 7

Arrays are fixed size. Somethimes you need to increase the size of an array. The only way to do this is to create a new array which is bigger and then copy all of the values over.

Given a array of numbers you are to create a method which will double the size of the array. So if the array was 10 then the new size will be 20.

public int[] doubleArray(int array[])

 

 
Basics
Menu
Search