hello
tnx everyone this forum really helps me sometimes!
can someone please tell me how i can convert a double number to nearest integer number?

int x;
double d=99.8;
x=Math.round(d);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.