Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help writing a java method goes over every single row and column of a 2d array (4*4) (nested FOR loop) and checks where

I need help writing a java method goes over every single row and column of a 2d array (4*4) (nested FOR loop) and checks where the given tile number is located in the array. As soon as it finds its location, it creates an integer array, place the row and column into that array and returns it. Hint: The following line of code shows how to create and return an integer array with two numbers

 return new int[]{number1, number2} 

assume the inputs are the 4*4 2d array and the number selected in the array that will be searched

what's returned is an integer array containing the row and column values of the tile location in the board.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions