Question
JAVA 2.) Provide the definition of a method named doThis that would take as input parameters two completely filled arrays of integers named a1 and
JAVA
2.) Provide the definition of a method named doThis that would take as input parameters two completely filled arrays of integers named a1 and a2. Your method should return back to the caller another integer array that holds the 2*a1+a2. For example, if a1[0] has 3 and a2[0] has 4, then the array that is returned should have 10 (2*3+4) at its location 0. Assume that the input arrays are of equal length.
Write a piece of code that would call pairwiseAdd and would pass as input to it the integer arrays x and y. Your code should save the returned array as z.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started