jeudi 10 novembre 2016

If loop not printing

Hi my if loop won't print and I'm not sure why. Heres what I have:

    for(int i = 0; i < wordLengthCount.length; i++)
    {
        if(wordLengthCount[i] != 0)
        {
            info += "     " + i + "\t         " + wordLengthCount[i] + "\n";
        }
    }
    info += "Average word length = " + dFormat.format(averageWordLength) + "\n"
            + "==========================================================";
return info;

Aucun commentaire:

Enregistrer un commentaire