Searching for Y value in an array of point
Hopefully, someone can enlighten me ?
I have an array of point
int[] depth ={25, 30, 35, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190};
int[] minutes ={595, 405, 310, 200, 100, 60, 50, 40, 30, 25, 20, 15, 10, 10, 5, 5, 5, 5, 5};
Point[] points =new Point[depth.length];
for(int i = 0; i < points.length; i++)
{
points[i] =new Point(depth[i], minutes[i]);
}
JTextField tfXvalue =new JTextField();
String getXvalue = tfdepth.getText();
Say the input of getXvalue is 40. Then I do all of the necessary conversions from string to double etc...
I need to tell the program to look in the array, and return the Y value where X=40.
I haven't the slightest idea where to start. !!!!
Would someone please point me in the right direction ?

