I am trying to format add a zero to any value less than 10, so 09. So at the end of the loop, the "total" value will format to numbers less than 10 with a zero.
Here is my code but it still isn't working :
int total = 0;
String holder = val + "-" + s + "-" + frame + "-";
for (int i = 0; i < holder.length(); i++)
{
int mod = holder.charAt(i);
total += mod;
total = total%100; //get remainder
}
string totalchk = String.format("%02d", total);