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