printf java boolean code example Example: printf java boolean boolean car = true; System.out.printf("%b",car); System.out.flush();