toByte

fun toByte(): Byte

Returns this number as Byte.


Calling from Kotlin

Here's an example of calling this method from Kotlin code:

val actual: Byte = Zero()
.toByte()
val expected: Byte = 0
assertEquals(expected, actual)

Calling from Java

Here's an example of calling this method from Java code:

final Zero zero = new Zero();
final byte actual = zero.toByte();
final byte expected = 0;
Assertions.assertEquals(expected, actual);