Algorithms/Find maximum/Java findMax method 6
< Algorithms < Find maximumprivate 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
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.