All pastes #793884 Raw Edit

Something

public text v1 · immutable
·published 2007-11-22 18:34 UTC
rendered paste body
		public static Comparable<Object> max(Comparable<Object>[] data) {
			Comparable<Object> max;
			if(data.length == 0){
				return null;
			}
			max = data[0];
			for (int i=1; i<data.length; i++) {
				if(max.compareTo(data[i]) < 0){
					max = data[i];
				}
			}
			return max;
		}