given two binary numbers represented as strings, prints their sum in binary. The binary strings are comma separated, two per line. The final answer should not have any leading zeroes. In case the answer is zero, just print one zero i.e. 0
Your program should read lines from standard input. Each line contains two binary strings, separated by a comma and no spaces.
For each pair of binary numbers print to standard output their binary sum, one per line.
THIS IS THE INPUT:
input 1: 110011,1010
input 2: 11010,00101001
THIS IS MY OUTPUT
out put 1: 111010
output 2: 01011011
THIS IS A DESIRE OUTPUT
Line 26, your program would already have thrown a NPE before you got here to check for null.
Lines 33 & 38, you want to compare using >= 0.
Line 30 -ditto-
Lines 46 & 47 should be outside the loop.
Line 49 should be outside the loop.