Open In App

Scala short <(x: Byte): Boolean

Last Updated : 29 Dec, 2019
Improve
Improve
Like Article
Like
Save
Share
Report

Short, a 16-bit signed integer (equivalent to Java’s short primitive type) is a subtype of scala.AnyVal. The <(x: Byte) method is utilized to return true if this value is less than x, false otherwise.

Method Definition: def <(x: Byte): Boolean

Return Type: It returns true if this value is less than x, otherwise false.

Example #1:




// Scala program of Short <(x: Byte) 
// method 
  
// Creating object 
object GfG 
  
    // Main method 
    def main(args:Array[String]) 
    
      
        // Applying Short <(x: Byte) function 
        val result = (998.toShort).<(11:Byte)
          
        // Displays output 
        println(result) 
      
    


Output:

False

Example #2:




// Scala program of Short <(x: Byte) 
// method 
  
// Creating object 
object GfG 
  
    // Main method 
    def main(args:Array[String]) 
    
      
        // Applying Short <(x: Byte) function 
        val result = (102.toShort).<(101:Byte)
          
        // Displays output 
        println(result) 
      
    


Output:

false


Previous Article
Next Article

Similar Reads

Scala Byte !=(x: Byte): Boolean
In Scala, Byte is a 8-bit signed integer (equivalent to Java's byte primitive type). The method !=(x:Byte) method is utilized to return true if the value is not equal to the specified value x, otherwise returns false. Method Definition: Byte !=(x: Byte): Boolean Return Type: It returns true if the value is not equal to the specified value, otherwis
1 min read
Scala Byte &lt;(x: Byte): Boolean
In Scala, Byte is a 8-bit signed integer (equivalent to Java's byte primitive type). The method &lt;(x:Byte) method is utilized to return true if this value is less than x, false otherwise. Method Definition: Byte &lt;(x: Byte): Boolean Return Type: It returns true if this value is less than x, false otherwise. Example #1: // Scala program of Byte
1 min read
Scala Byte &lt;=(x: Byte): Boolean
In Scala, Byte is a 8-bit signed integer (equivalent to Java's byte primitive type). The method &lt;=(x:Byte) method is utilized to return true if this value is less than or equal to x, false otherwise. Method Definition: Byte &lt;=(x: Byte): Boolean Return Type: It returns true if this value is less than or equal to x, false otherwise. Example #1:
1 min read
Scala Byte &gt;(x: Byte): Boolean
In Scala, Byte is a 8-bit signed integer (equivalent to Java's byte primitive type). The method &gt;(x:Byte) method is utilized to return true if this value is greater than x, false otherwise. Method Definition: Byte &gt;(x: Byte): Boolean Return Type: It returns true if this value is greater than x, false otherwise. Example #1: // Scala program of
1 min read
Scala Byte &gt;=(x: Byte): Boolean
In Scala, Byte is a 8-bit signed integer (equivalent to Java's byte primitive type). The method &gt;=(x:Byte) method is utilized to return true if this value is greater than or equal to x, false otherwise. Method Definition: Byte &gt;=(x: Byte): Boolean Return Type: It returns true if this value is greater than or equal to x, false otherwise. Examp
1 min read
Scala Byte ==(x: Byte): Boolean
In Scala, Byte is a 8-bit signed integer (equivalent to Java's byte primitive type). The method ==(x:Byte) method is utilized to return true if this value is equal to x, false otherwise. Method Definition: Byte ==(x: Byte): Boolean Return Type: It returns true if this value is equal to x, false otherwise. Example #1: // Scala program of Byte ==(x:
1 min read
Scala short &gt;(x: Byte): Boolean
Short, a 16-bit signed integer (equivalent to Java's short primitive type) is a subtype of scala.AnyVal. The &gt;(x: Byte) method is utilized to return true if this value is greater than x, false otherwise. Method Definition: def &gt;(x: Byte): Boolean Return Type: It returns true if this value is greater than x, otherwise false. Example #1: // Sca
1 min read
Scala short &gt;=(x: Byte): Boolean
Short, a 16-bit signed integer (equivalent to Java's short primitive type) is a subtype of scala.AnyVal. The &gt;=(x: Byte) method is utilized to return true if this value is greater than or equal to x, false otherwise. Method Definition: def &gt;=(x: Byte): Boolean Return Type: It returns true if this value is greater than or equal to x, otherwise
1 min read
Scala short &lt;=(x: Byte): Boolean
Short, a 16-bit signed integer (equivalent to Java's short primitive type) is a subtype of scala.AnyVal. The &lt;=(x: Byte) method is utilized to return true if this value is less than or equal to x, false otherwise. Method Definition: def &lt;=(x: Byte): Boolean Return Type: It returns true if this value is less than or equal to x, otherwise false
1 min read
Scala Byte !=(x: Short): Boolean
In Scala, Byte is a 8-bit signed integer (equivalent to Java's byte primitive type). The method !=(x:Short) method is utilized to return true if the value is not equal to the specified value x, otherwise returns false. Method Definition: Byte !=(x: Short): Boolean Return Type: It returns true if the value is not equal to the specified value, otherw
1 min read