Scala Int >(x: Byte) 方法及其示例
**>(x: Byte) ** 方法用于在 int 值大于 byte 值时返回 true。
方法定义:(Int_Value).>(Byte_Value)
返回类型:如果 int 值大于 byte 值则返回 true。
示例 #1:
// 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 = (65).>(10)
// 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).>(100)
// Displays output
println(result)
}
}
false
阅读更多:Scala 教程
极客教程