X668: Create an array and initialize

Given a size for an array and the initial value, create and return a new int array that is initialized with initial stored in all the positions in the array.

Examples:

createArray(5,1) -> {1,1,1,1,1}
createArray(1,5) -> {5}

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.