Smoon Smoon - 1 year ago
304 0

Set up airport class with getters and toString (totally understand this :/ ). Have got the data, split it, and put into my new airport object. Now I'm unsure how to search through a specific element of the object to find something.


Lowest element in object

public static void airportExample() {
			String[] data = Data.getAirports();
			ArrayList<Airport>airports = new ArrayList<Airport>();
			for (int i = 1; i < data.length; i++) {
				String line = data[i];
			String[] elements = line.split(",");
			String id = elements[0];
			String name = elements[1];
			String latString = elements[2];
			String lonString = elements[3];
			Double lat = Double.parseDouble(latString);
			Double lon = Double.parseDouble(lonString);
			Airport airport = new Airport (id, name, lat, lon);
				Double easterly = 0.0;
				for(Double east : airport.getLon()){
			        if(airport.getLon() < easterly));
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download