A Traditional For Loop
Write a static method called calc that has one parameter that is a 2D array of int called data (some of its arrays can be null). Your method should return a 1D array of Integer, with each element being the sum of its corresponding array in data. If any of the arrays in data are null, use null as the value for the corresponding element. You must use a traditional outer for loop and a traditional inner for loop.e.g if data is => { {1,1,2} , {6} , {7,1} , null } , then calc should return => { 4 , 6 , 8 , null }b) The above method is in a class called Util. Write code to create the following 2D array of int and called nos, then call your method above using nos and save the results in a variable called ans (declare it).
RECOMMENDED: [SOLVED] A Traditional For Loop
With us, you are either satisfied 100% or you get your money back-No monkey business