Question: I need a java code for this one (not explanation) just the code for these methods quick please Write two generic methods gReplace0: takes a

I need a java code for this one (not explanation) just the code for these methods quick please I need a java code for this one (not explanation) just the

Write two generic methods gReplace0: takes a 2D array of generic elements and two scalars of the same type. The method must replace all occurrences of the first scalar with the second one in the generic array. gPrint0: takes a 2D array of generic elements as input argument and prints the contents of the generic array to the console. Example: Suppose that the generic array content is a ={{1,2},{3,4},{2,5}} if n1=2 and n2=0, gReplace() should replace all 2 s with 0 s and you should end up with a={{1,0},{3,4},{0, 5}}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!