Challenge: Parameter Manipulation
Task
Swipe to start coding
You will practice manipulating method parameters in Java by performing a series of transformations on an array of integers.
- Write a method named
manipulateArraythat takes anint[]array and two integersmultiplyByandaddValueas parameters. - For each element in the array, first multiply it by
multiplyBy, then addaddValueto the result. - Return a new
int[]array containing the transformed values.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 12
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 6.67
Challenge: Parameter Manipulation
Swipe to show menu
Task
Swipe to start coding
You will practice manipulating method parameters in Java by performing a series of transformations on an array of integers.
- Write a method named
manipulateArraythat takes anint[]array and two integersmultiplyByandaddValueas parameters. - For each element in the array, first multiply it by
multiplyBy, then addaddValueto the result. - Return a new
int[]array containing the transformed values.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 12
single