As you can see the default value is 0. I convert whatever the user enters to a double value and then do some calculations which works just fine. That is unless the user enters a null value or just deletes the default 0 value. Then I get an exception thrown because the array does not contain a valid number.

To avoid this I added the following code to check for a null value:

Code:

if(myArray[0].getText()=="") myArray[0].setText("0");

However I get this error now:

Uncaught exception thrown - NumberFormatException

It seems to me that the if statement is not triggering the then statement to set it back to the default 0 value.