Scala Int >(x: Byte) 方法及其示例

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 教程

Python教程

Java教程

Web教程

数据库教程

图形图像教程

大数据教程

开发工具教程

计算机教程