The %(x: Byte) method is utilized to find the remainder of the division of the stated character value by ‘x’ of type Byte.
Method Definition: def %(x: Byte): Int
Return Type: It returns Int.
Example: 1#
object GfG
{
def main(args : Array[String])
{
val result = 'E' . % ( 111 )
println(result)
}
}
|
Example: 2#
object GfG
{
def main(args : Array[String])
{
val result = 'B' . % (- 116 )
println(result)
}
}
|