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