• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1871
  • Last Modified:

"incompatible types - found int but expected boolean"

   public static boolean word_thousands(int main_numIn)
    {
        if (main_numIn = 1)
        {
            System.out.print("One");
            return true;
        }
        else
        {            
            return false;
        }

got this error: "incompatible types - found int but expected boolean" at line

if (main_numIn = 1)

anyone know how to fix this?
0
ishcmc
Asked:
ishcmc
1 Solution
 
Ajay-SinghCommented:
> if (main_numIn = 1)
suould be

if(main_numIn == 1)
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now