While I'm being pedantic, this should be: double pendingCreditAmount = 0.0;