id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

jebbert@volusia.k12.fl.us > testSLAPHL_Q10
prev  |  next  |  chance

Write a method that accepts an array of integers, the number to find called "find", and the number to replace it with called "replace". Return the original array with all instances of "find" replaced with "replace".


testSLAPHL_Q10([50, 60, 20, 50], 50, -1) → [-1, 60, 20, -1]
testSLAPHL_Q10([4, 3, 2, 1], 2, 55) → [4, 3, 55, 1]
testSLAPHL_Q10([100, 4, 6], 50, 2000) → [100, 4, 6]

...Save, Compile, Run (ctrl-enter)

public int[] testSLAPHL_Q10(int[] nums, int find, int replace) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 299

Copyright Nick Parlante 2017 - privacy