Open In App

Scala Long >(x: Float) method

Last Updated : 02 Nov, 2019
Improve
Improve
Like Article
Like
Save
Share
Report

In Scala, Long is a 64-bit signed integer, which is equivalent to Java’s long primitive type. The >(x: Float) method is utilized to return true if this value is greater than x, false otherwise.

Method Definition – def >(x: Float): Boolean

Returns – Returns true if this value is greater than x, false otherwise.

Example #1:




// Scala program to explain the working 
// of Long >(x: Float) method
   
// Creating object
object GfG
   
    // Main method
    def main(args:Array[String])
    {
       
        // Applying >(x: Float) function
        val result = (12.toLong).>(8:Float)
           
        // Displays output
        println(result)
       
    }


Output:

true

 

Example #2:




// Scala program to explain the working 
// of Long >(x: Float) method
   
// Creating object
object GfG
   
    // Main method
    def main(args:Array[String])
    {
       
        // Applying >(x: Float) function
        val result = (5.toLong).>(13:Float)
           
        // Displays output
        println(result)
       
    }
}


Output:

false


Similar Reads

Scala Float to(end: Float, step: Float) method with example
The to(end: FLoat, step: Float) method is utilized to return a range from the stated float value to the 'end', which is given in the arguments list and some step is also specified in the arguments list. Method Definition: def to(end: Float, step: Float): Inclusive Return Type: It returns the range. Example #1: // Scala program of Float to() // meth
1 min read
Scala Float until(end: Float, step: Float) method with example
The until(end: Float, step: Float) method is utilized to return a range from the start value to exact previous value of specified end float value. Here the range's values are jumping by step value. Method Definition: defuntil(end: Float, step: Float): collection.immutable.Range Return Type: It returns the range. Example #1: // Scala program of Floa
1 min read
Scala Long *(x: Long) method
In Scala, Long is a 64-bit signed integer, which is equivalent to Java's long primitive type. The *(x: Long) method is utilized to return the product of the specified Long value and Long value. Method Definition - def *(x: Long) Returns - Returns the product of this value and x. Example #1: // Scala program to explain working of // Long *(x: Long)
1 min read
Scala Long &(x: Long) method
In Scala, Long is a 64-bit signed integer, which is equivalent to Java's long primitive type. The &(x: Long) method is utilized to return the Bitwise AND of the specified Long value and Long value. Method Definition - def &(x: Long) Returns - Returns the Bitwise AND of this value and x. Example #1: // Scala program to explain working of //
1 min read
Scala Long !=(x: Long) method with example
In Scala, Long is a 64-bit signed integer, which is equivalent to Java's long primitive type. The !=(x: Long) method is utilized to check whether the given Long value is equal to each other or not. Method Definition - def !=(x: Long): Boolean Returns - Returns true if this value is not equal to x, false otherwise. Example #1: // Scala program to ex
1 min read
Scala Long %(x: Long) method
In Scala, Long is a 64-bit signed integer, which is equivalent to Java's long primitive type. The %(x: Long) method is utilized to return the remainder when the given long value is divided by the Long value. Method Definition - def %(x: Long) Returns - Returns the remainder of the division of this value by x. Example #1: // Scala program to explain
1 min read
Scala Long /(x: Long) method
In Scala, Long is a 64-bit signed integer, which is equivalent to Java's long primitive type. The /(x: Long) method is utilized to return the quotient of this value and given value x. Method Definition - def /(x: Long): Long Returns - Returns the quotient of this value and x. Example #1: // Scala program to explain the working // of Long /(x: Long)
1 min read
Scala Long -(x: Long) method
In Scala, Long is a 64-bit signed integer, which is equivalent to Java's long primitive type. The -(x: Long) method is utilized to return the difference of this value and given value x. Method Definition - def -(x: Long): Long Returns - Returns the difference of this value and x. Example #1: // Scala program to explain the working // of Long -(x: L
1 min read
Scala Long +(x: Long) method
In Scala, Long is a 64-bit signed integer, which is equivalent to Java's long primitive type. The +(x: Long) method is utilized to return the sum of this value and given value x. Method Definition - def +(x: Long): Long Returns - Returns the sum of this value and x. Example #1: // Scala program to explain the working // of Long +(x: Long) method //
1 min read
Scala Long <(x: Long) method
In Scala, Long is a 64-bit signed integer, which is equivalent to Java's long primitive type. The <(x: Long) method is utilized to return true if this value is less than x, false otherwise. Method Definition - def <(x: Long): Boolean Returns - Returns true if this value is less than x, false otherwise. Example #1: // Scala program to explain
1 min read
Article Tags :