/***** Query the Young's matrix, that is, the right and bottom elements of any element in the matrix are greater than it, the elements on the left and bottom are smaller than **/public class MatriFind {/***** @ param a matrix to be searched * @ param width * @ param height Matrix * @ param num of */public void find (int a [] [], int width, int height, int num) {// point the pointer to the last element of the first row int xPos = width-1; int yPos = 0; while (xPos> = 0 & yPos <= height-1) {if (a [xPos] [yPos] = num) {System. out. println ("xPos:" + xPos + "yPos:" + yPos); return;} else If (a [xPos] [yPos]> num) {xPos --;} else {yPos ++;} System. out. println ("not found! ");} Public static void main (String [] args) {MatriFind mf = new MatriFind (); int matrix [] [] = {1, 2, 8, 9}, {2, 4, 9, 12}, {,}, {6, 8, 11, 15}; mf. find (matrix, matrix [0]. length, matrix. length, 10 );}}