reset password
Author Message
Rochester123
Posts: 5
Posted 21:35 Feb 23, 2014 |

Got "bad operand types for binary operator '&&' First type: int. Second type: boolean." as an error in FirstMatch class..

while (in.nextInt() && !found)
        { String word = in.nextInt;
            if (word.length > 9)
            { longword = word;
                found = true;
            }
        }

I don't know what's wrong.

dhaimoud
Posts: 11
Posted 21:43 Feb 23, 2014 |

            String word = in.next();
            if (word.length() > THRESHOLD)