-3

How do i get next large integer after division in java android

for example

11/5 = 2.2, wanted to round of this answer 3 not to 2

My calculations are complex and final answer, I need to show rounded of to next big integer value

Regards

Sujay

1 Answers1

0

Use can use ceil method,

double ans = ((double) 11) / 5;
double result = Math.ceil(ans);
K Neeraj Lal
  • 6,768
  • 3
  • 24
  • 33