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