Last modified on 25 April 2009, at 03:38

Algorithms/Find maximum/Java findMax method 6

 private int findMaxFourEle(int i_intA,int i_intB,int i_intC, int i_intD) {
    int max = i_intA;
    if ( i_intB > max ) max = i_intB;
    if ( i_intC > max ) max = i_intC;
    if ( i_intD > max ) max = i_intD;     
    return max;
 } // end method
 public int findMaxThreeEle(int i_intA,int i_intB,int i_intC) {
    return findMaxFourEle(i_intA,i_intB,i_intC,i_intC);
 } // end method