Scala Char +(x: Float) method with example
Last Updated :
03 Nov, 2019
The +(x: Float) method is utilized to find the sum of the stated character value and ‘x’ of type Float.
Method Definition: def +(x: Float): Float
Return Type: It returns Float.
Example: 1#
object GfG
{
def main(args : Array[String])
{
val result = 'E' .+( 10.4 )
println(result)
}
}
|
Example: 2#
object GfG
{
def main(args : Array[String])
{
val result = 'G' .+( 54.1 )
println(result)
}
}
|
Share your thoughts in the comments
Please Login to comment...