hello, I am new to java programming and im trying to do a "do while" loop in this program. However it gives me an error "cannot find symbol" I dont understand what I am doing wrong, because i tried using the variable transactions the same way using just a while loop and it worked just fine. Please any help?
JAVA Code:
do
{
Scanner tran = new Scanner (System.in);
System.out.println("How Many Transactions would you like to do in Month: " + count + " (Entering a negative number will terminate the program)");
int transactions = tran.nextInt();
for (int insideCount = 1; insideCount <= transactions; insideCount++)
{
Scanner checkTran = new Scanner (System.in);
System.out.println("Please, Transacion #" + insideCount + "(A negative number will result in a withdrawal");
double amount = checkTran.nextDouble();
if (amount > 0)
{
testAccount.setDeposit(amount);
}
else if (amount < 0)
{
testAccount.setWithdrawal(amount);
}
}
} while (transactions > 0); //here is the error
}
}