package test; /** * Created by GrabetsB on 24.02.2015. */ public class FindTemperatureNearNull { public static double closestToZero(double ts[]) throws Exception{ double minTs = -273, maxTs = 5560, min = -273, max = 5560; if (ts.length==0) return 0; for (int i = 0; i5560) throw new Exception(); else { if (ts[i]<0){ if (ts[i]>min) min = ts[i]; } else if (ts[i]