Java Boolean to Byte convertBooleanToByte(boolean inputBool)

Here you can find the source of convertBooleanToByte(boolean inputBool)

Description

convert Boolean To Byte

License

Open Source License

Declaration

public static byte convertBooleanToByte(boolean inputBool) 

Method Source Code

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

public class Main {
    public static byte convertBooleanToByte(boolean inputBool) {
        int output = (inputBool) ? 1 : 0;
        return (byte) output;
    }//from w ww.ja  va2  s.  co  m
}

Related

  1. booleanTobyte(final boolean value)
  2. booleanToByteBitflags(boolean[] flags)
  3. booleanToBytes(boolean b)
  4. booleanToBytes(boolean b)
  5. booleanToBytes(final boolean b)