The int variable: result can never have a null value.


What was the value of intBet? Could it be 0? To see its value, add a println to print intBet's value after it is set.