X668: Create Array with Values

Given a size for an array and the initial value, create and return a new int array and initialize it with initial.

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.