Java Integer to Boolean intToBool(int i)

Here you can find the source of intToBool(int i)

Description

Converts from int to boolean.

License

Open Source License

Parameter

Parameter Description
i the int to use

Return

true if i is 1, false otherwise

Declaration

public static boolean intToBool(int i) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**/*from  w  ww.j av  a2s .co  m*/
     * Converts from int to boolean. 
     * @param i the int to use
     * @return true if i is 1, false otherwise
     */
    public static boolean intToBool(int i) {
        if (i == 1)
            return true;
        else
            return false;
    }
}

Related

  1. convertIntToBoolean(int aValue)
  2. convertIntToBoolean(int value)
  3. IntegerToboolean(final Integer value)
  4. integerToStrBool(Integer integer)
  5. IntToBool(int Expression)
  6. intToBool(int int_in, int length)
  7. intToBoolAra(int num, int len)
  8. intToBoolean(int x)
  9. intToBoolean(int[] values)