I\'m realy beginning to learn Java. When I run this code everything works fine till I leave my EditText boxes in the from empty and hit the run button. Then I get:
you should wrap the Double.parseDouble.. statements in a try/catch clause, to catch any NumberFormatExceptions, and set other values where they fail
edit:
try{
etKids = Double.parseDouble(noKids.getText().toString());
} catch (final NumberFormatException e) {
etKids = 1.0;
}
try{
etGumballs = Double.parseDouble(noGumballs.getText().toString());
} catch (final NumberFormatException e) {
etGumballs = 1.0;
}