Java Boolean to Byte booleanToByte(boolean b)

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

Description

boolean To Byte

License

LGPL

Declaration

public static byte booleanToByte(boolean b) 

Method Source Code

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

public class Main {
    public static byte booleanToByte(boolean b) {
        return b ? (byte) 1 : 0;
    }//from   w ww . j a v  a 2s .c o  m
}

Related

  1. BooleanToByte(boolean value)
  2. booleanToByte(boolean x)
  3. booleanToByte(boolean[] array)
  4. booleanToByte(boolean[] bool)