Scala Int byteValue() method with example
Last Updated :
30 Jan, 2020
The byteValue() method is utilized to return the byte value of the specified int value.
Method Definition: def byteValue(): Byte
Return Type: It returns the byte value of the given int value.
Example #1:
object GfG
{
def main(args : Array[String])
{
val result = ( 15 ).byteValue
println(result)
}
}
|
Example #2:
object GfG
{
def main(args : Array[String])
{
val result = ( 1586 ).byteValue
println(result)
}
}
|
Share your thoughts in the comments
Please Login to comment...