Java Binary to Int boolean2integer(boolean b)

Here you can find the source of boolean2integer(boolean b)

Description

booleaninteger

License

Apache License

Declaration

public static int boolean2integer(boolean b) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static int boolean2integer(boolean b) {
        return b ? -1 : 0;
    }/*w  w  w.  j  a  va 2s.  co  m*/
}

Related

  1. binaryToInt(String binary, int intlength)
  2. binaryToInt(String binaryValue, boolean signIncluded)
  3. binaryToLong(String bin)
  4. binToDec(String str)
  5. boolean2integer(boolean b)