Skip to main content
1 of 2
Apex N-u-b
  • 1.3k
  • 3
  • 29
  • 51

Apex division shows zero value instead of correct value

Why is totals showing zero for me in this snippet?

Integer stats;

Decimal total;

Integer cntOrg=60;

stats=200; total = stats/cntOrg;

system.debug('Values for '+org+' is ' + total);

Apex N-u-b
  • 1.3k
  • 3
  • 29
  • 51