Scala Int >=(x:Byte)示例方法
>=(x:Byte) 方法用于返回true,如果指定的int值大于或等于short值,则返回true,否则返回false。
方法定义:(Int_Value).>=(Byte_Value)
返回类型:如果指定的int值大于或等于byte值,则返回true,否则返回false。
示例1:
// Scala program of Int >=(x: Byte)
// method
// Creating object
object GfG
{
// Main method
def main(args:Array [String])
{
// ApplyingInt >=(x:Byte)function
val result =(66).>=(55)
// Displays output
println(result)
}
}
true
示例2:
// Scala program of Int >=(x: Byte)
// method
// Creating object
object GfG {
// Main method
def main(args:Array[String])
{
// Applying Int >=(x: Byte) function
val result =(50).>=(60)
// Displays output
println(result)
}
}
false
阅读更多:Scala 教程
极客教程