Scala Float >=(x: Byte) 方法及示例
** >=(x: Byte) ** 方法返回true,如果float值大于或等于指定的byte值。
方法定义:(Float_Value).>=(Byte_Value)
返回类型:如果float值大于或等于指定的byte值,则返回 true。
示例1:
// Scala program of Float >=(x: Byte)
// method
// Creating object
object GfG
{
// Main method
def main(args:Array[String])
{
// Applying >=(x: Byte) function
val result = (100.0).>=(60)
// Displays output
println(result)
}
}
true
示例2:
// Scala program of Float >=(x: Byte)
// method
// Creating object
object GfG
{
// Main method
def main(args:Array[String])
{
// Applying >=(x: Byte) function
val result = (10.0).>=(60)
// Displays output
println(result)
}
}
false
更多Scala相关文章,请阅读:Scala 教程
极客教程