Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

"incompatible types - found int but expected boolean"

Posted on 2006-11-16
1
1,823 Views
Last Modified: 2012-05-05
   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
Comment
Question by:ishcmc
1 Comment
 
LVL 23

Accepted Solution

by:
Ajay-Singh earned 500 total points
ID: 17963339
> if (main_numIn = 1)
suould be

if(main_numIn == 1)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
jar file executable 12 58
hibernate jars 4 45
ejb entity bean example issue 2 16
Cisco ASA: Java web start no go, asdm launcher no go 3 37
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This video teaches viewers about errors in exception handling.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question