times
Multiplies this decimal by the other one.
Calling from Kotlin
Here's an example of calling this function from Kotlin code:
val x: Decimal = Decimal.parse("1.1")
val y: Decimal = Decimal.parse("1.1")
val result: Decimal = x * y
val expected: Decimal = Decimal.parse("1.21")
check(result == expected)Content copied to clipboard
Calling from Java
Here's an example of calling this function from Java code:
final Decimal x = Decimal.parse("1.1");
final Decimal y = Decimal.parse("1.1");
final Decimal result = x.times(y);
final Decimal expected = Decimal.parse("1.21");
final boolean check = result.equals(expected);
if (!check) throw new IllegalStateException("Check failed.");Content copied to clipboard