vendredi 23 janvier 2015

Invert if, have tried multiple ways. cannot find error in code

when I run this code I get the error,



at javaapplication1.JavaApplication1.bigger(JavaApplication1.java:32)


(the inver if warning), however I have tried everything I can think of. I'm not sure what I'm missing here in order to have it compile.



public static boolean bigger(int x, int y)
{
int biggerNum =0;
int numBigger = 0;
int [] data = new int[MAXVALUES];
for(int curIndex = 0; curIndex < data.length-1; curIndex++)
{
if (bigger(data[curIndex],data[data.length-1]))
{
numBigger++;
}
else
{
return false;
}

}

}

Aucun commentaire:

Enregistrer un commentaire