Scala Float >=(x: short) 方法及示例
**>=(x: Short) ** 方法用于如果浮点值大于或等于指定的short值则返回true。
方法定义:(Float_Value).>=(Short_Value)
返回类型:如果浮点值大于等于指定的short值,则返回true。
示例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 = (100.0).>=(60)
// Displays output
println(result)
}
}
true
示例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 = (10.0).>=(60)
// Displays output
println(result)
}
}
false
更多Scala相关文章,请阅读:Scala 教程
极客教程