Scala Char reverseBytes() method with example
Last Updated :
03 Nov, 2019
The reverseBytes() method is utilized to find the value obtained by reversing the sequence of the bytes in the stated char value.
Method Definition: def reverseBytes: Char
Return Type: It returns Char.
Example: 1#
object GfG
{
def main(args : Array[String])
{
val result = '\u4d00' .reverseBytes
println(result)
}
}
|
Example: 2#
object GfG
{
def main(args : Array[String])
{
val result = '\u5d00' .reverseBytes
println(result)
}
}
|
Share your thoughts in the comments
Please Login to comment...