Create a polygon object with your data. Use the contains method of that polygon object.
Here is the java api : http://docs.oracle.com/javase/7/docs/api/
As for algorithm, you should try connecting the points and generate equations of line. Store the lines in a list, and see if the point you are testing is on the bounds of those lines.