Open In App

Scala Char /(x: Byte) method with example

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

The /(x: Byte) method is utilized to find the quotient of the stated character value and ‘x’ of type Byte.

Method Definition: def /(x: Byte): Int

Return Type: It returns Int.

Example: 1#




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


Output:

0

Example: 2#




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


Output:

-6


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