X1089: Find *

The following method takes in a 2D character array. Somewhere in that array, there may be one '*' character. This method should find that character and return a String representing the row and column where it is located.

For example:

char[][] matrix =
{
    {'-', '-', '-', '-'},
    {'-', '-', '-', '-'},
    {'-', '-', '*', '-'},
}

Executing findStar(matrix) would return the String "(2,2)".

If the array contains no '*' character, the method should return the string "Not Found!"

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.