java code for an ordered array let' examine some java code that implements an ordered array we'll use the ordarray class to encapsulate the array and its algorithms the heart of this class is the find(methodwhich uses binary search to locate specified data item we'll examine this method in detail before showing the complete program binary search with the find(method the find(method searches for specified item by repeatedly dividing in half the range of array elements to be considered here' how this method lookspublic int find(double searchkeyint lowerbound int upperbound nelems- int curinwhile(truecurin (lowerbound upperbound if( [curin]==searchkeyreturn curin/found it else if(lowerbound upperboundreturn nelems/can' find it else /divide range if( [curinsearchkeylowerbound curin /it' in upper half else upperbound curin /it' in lower half /end else divide range /end while /end find(the method begins by setting the lowerbound and upperbound variables to the first and last occupied cells in the array this specifies the range where the item we're looking forsearchkeymay be found thenwithin the while loopthe current indexcurin