Here you can find the source of toBinaryChar(boolean bit)
public static char toBinaryChar(boolean bit)
//package com.java2s; /**//from w w w . j a v a2 s .c om * A simple class comprised of various tools used in handling of boolean arrays and values. * * @author Raymond Berg www.rwberg.org * * Use is made available under the Creative Commons License. * Feel free to use but leave attribution to original author throughout use. */ public class Main { public static char toBinaryChar(boolean bit) { return bit ? '1' : '0'; } }