Check out example codes for "java print boolean with spaces". It will help you in understanding the concepts better.

Code Example 1

if (c == ' ')

Code Example 2

System.out.printf("'%b', '%6b', '%.4b'%n", true, false, true);

Learn ReactJs, React Native from akashmittal.com