Here you can find the source of minNotMinus1(int i1, int i2)
Parameter | Description |
---|---|
i1 | a parameter |
i2 | a parameter |
public static int minNotMinus1(int i1, int i2)
//package com.java2s; //License from project: Apache License public class Main { /**//from w w w . j a va 2 s .c o m * Get min reject -1 * @param i1 * @param i2 * @return min reject -1 */ public static int minNotMinus1(int i1, int i2) { if (i1 == -1) { if (i2 > -1) return i2; else return -1; } else { if (i2 > -1 && i2 < i1) return i2; else return i1; } } }