带有示例的 Scala Float !=(x: Long) 方法
!=(x: Long)方法用于检查给定的 Float 和 Long 值是否彼此相等。
Method Definition: (Float_Value)!=(x: Long)
Return Type: It returns true if the given Float and Long value is not equal to each other, otherwise return false.
示例 #1:
// Scala program of Float !=(x: Long)
// method
// Creating object
object GfG
{
// Main method
def main(args:Array[String])
{
// Applying !=(x: Long) function
val result = (12.4).!=(12.4)
// Displays output
println(result)
}
}
输出:
false
示例 #2:
// Scala program of Float !=(x: Long)
// method
// Creating object
object GfG
{
// Main method
def main(args:Array[String])
{
// Applying !=(x: Long) function
val result = (12.4).!=(126)
// Displays output
println(result)
}
}
输出:
true