I am trying to build a calculator for android, i am trying to multiply two numbers. If i give number 1 and leave number 2 open, i want to get zero as an answer.
I first thought it could be the problem of not having a value for the double. So i tried: if (Double.isNaN(number1)) { number1=0; } But it did not work.
How do i make this happen?