Open In App

Scala Char <(x: Char) method with example

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

The <(x: Char) method is utilized to find if the stated character value is less than ‘x’ or not. And the type of ‘x’ must be Char.

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

Return Type: It returns true if the stated character value is less than “x” else it returns false.

Example: 1#




// Scala program of <(x: Char)
// method
  
// Creating object
object GfG
  
    // Main method
    def main(args:Array[String])
    {
      
        // Applying <(x: Char) method 
        val result = 'D'.<('A')
          
        // Displays output
        println(result)
      
    }


Output:

false

Example: 2#




// Scala program of <(x: Char)
// method
  
// Creating object
object GfG
  
    // Main method
    def main(args:Array[String])
    {
      
        // Applying <(x: Char) method
        val result = 'D'.<('E')
          
        // Displays output
        println(result)
      
    }


Output:

true


Similar Reads

Scala Char to(end: Char, step: Char) method with example
The to(end: Char, step: Char) method is utilized to return a range from the stated character 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: Char, step: Char): Inclusive[Char] Return Type: It returns the range. Example: 1# // Scala program of to() // method /
1 min read
Scala Char |(x: Char) method with example
The |(x: Char) method is utilized to find the bit-wise OR of the stated character value and given 'x' in the argument list. Method Definition: def|(x: Char): Int Return Type: It returns the bit-wise OR of the stated character value and given 'x'. Example: 1# // Scala program of |(x: Char) // method // Creating object object GfG { // Main method def
1 min read
Scala Char ^(x: Char) method with example
The ^(x: Char) method is utilized to find the bit-wise XOR of the stated character and the given 'x' of type character in the argument list. Method Definition: def ^(x: Char): Int Return Type: It returns the bit-wise XOR of the stated character and given character type "x". Example: 1# // Scala program of ^(x: Char) // method // Creating object obj
1 min read
Scala Char &gt;=(x: Char) method with example
The &gt;=(x: Char) method is utilized to find if the stated character value is greater than or equal to 'x' or not. And the type of 'x' must be Char. Method Definition: def &gt;=(x: Char): Boolean Return Type: It returns true if the stated character value is greater than or equal to "x" else it returns false. Example: 1# // Scala program of &gt;=(x
1 min read
Scala Char &gt;(x: Char) method with example
The &gt;(x: Char) method is utilized to find if the stated character value is greater than 'x' or not. And the type of 'x' must be Char. Method Definition: def &gt;(x: Char): Boolean Return Type: It returns true if the stated character value is greater than "x" else it returns false. Example: 1# // Scala program of &gt;(x: Char) // method // Creati
1 min read
Scala Char ==(x: Char) method with example
The ==(x: Char) method is utilized to find if the stated character value is equal to 'x' or not. And the type of 'x' must be Char. Method Definition: def ==(x: Char): Boolean Return Type: It returns true if the stated character value is equal to "x" else it returns false. Example: 1# // Scala program of ==(x: Char) // method // Creating object obje
1 min read
Scala Char &lt;=(x: Char) method with example
The &lt;=(x: Char) method is utilized to find if the stated character value is less than or equal to 'x' or not. And the type of 'x' must be Char. Method Definition: def &lt;=(x: Char): Boolean Return Type: It returns true if the stated character value is less than or equal to "x" else it returns false. Example: 1# // Scala program of &lt;=(x: Char
1 min read
Scala Char !=(x: Char) method with example
The !=(x: Char) method is utilized to check if the stated character value is not equal to 'x'. And the 'x' is of type Char. Method Definition: def !=(x: Char): Boolean Return Type: It returns true if the stated character value is not equal to 'x' else it returns false. Example: 1# // Scala program of !=(x: Char) // method // Creating object object
1 min read
Scala Char %(x: Char) method with example
The %(x: Char) method is utilized to find the remainder of the division of the stated character value by 'x' of type Char. Method Definition: def %(x: Char): Int Return Type: It returns Int. Example: 1# // Scala program of %(x: Char) // method // Creating object object GfG { // Main method def main(args:Array[String]) { // Applying %(x: Char) metho
1 min read
Scala Char &amp;(x: Char) method with example
The &amp;(x: Char) method is utilized to find the bit-wise AND of the stated character value and 'x' of type Char. Method Definition: def &amp;(x: Char): Int Return Type: It returns Int. Example: 1# // Scala program of &amp;(x: Char) // method // Creating object object GfG { // Main method def main(args:Array[String]) { // Applying &amp;(x: Char) m
1 min read
Article Tags :