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