Notes
In Apex, the round()
method is used to return the rounded approximation of this Decimal. The number is rounded to zero decimal places using half-even rounding mode, that is, it rounds towards the “nearest neighbor” unless both neighbors are equidistant, in which case, this mode rounds towards the even neighbor.
Here's an example:
Decimal d1 = 3.48;
System.debug(d1.round());
Output: 3
Video
Video does not exists.