public class SomeClass { // Instance variable(s) private int[] theData; // Constructor(s) public SomeClass() { // constructor code goes here }. . . /** Populate the data in some way. */public voidint populateData(int theData[]) { /* code to populate theData instance variable goes here (e.g., might read it from a file) */ return numDataItems; } . . . /** Search for given value; return index. */publicint search(int theData[], int numItems, int searchValue) { int i; for (inti = 0; i <theData.lengthnumItems; i++ ) { if ( theData[i] == searchValue ) { return i; } } return -1; } . . .}