Write a method that takes as argument an integer size
and returns an integer array of that size. The method should allocate a new array...
CodeWorkout Pre-knowledge test
Score: 0 / 14.0
Exercises
Write a method that takes two arguments, the first is an integer size
and the second argument, init
, is a default value to use to...
Complete the function getArraySize()
so that it returns the size of the array passed in as an argument into the function. You cannot use...
Complete the function getElementAt()
so that it returns the element stored at the nth
position in the array numbers
. You may assume that...
Write a method that will make a copy of an array. The method takes one parameter, orig
. The method should make a new array the same size...
Write a method that takes an argument representing an array, orig
, and returns a new array that is 50% bigger than the original one. The...
We'll say that a value is "everywhere" in an array if for every pair of adjacent elements in the array, at least one of the pair is that...