Open In App

Scala Int intValue() method with example

Last Updated : 30 Jan, 2020
Comments
Improve
Suggest changes
Like Article
Like
Report
The intValue() method is utilized to return the int value of the specified value.
Method Definition: def intValue(): Byte Return Type: It returns the int value of the given value.
Example #1: Scala
// Scala program of Int intValue
// method 
  
// Creating object 
object GfG 
{  
  
    // Main method 
    def main(args:Array[String]) 
    { 
      
        // Applying intValue method 
        val result = (15).intValue
          
          
        // Displays output 
        println(result) 
      
    } 
} 
Output:
15
Example #2: Scala
// Scala program of Int intValue
// method 
  
// Creating object 
object GfG 
{  
  
    // Main method 
    def main(args:Array[String]) 
    { 
      
        // Applying intValue method 
        val result = (1586).intValue
          
          
        // Displays output 
        println(result) 
      
    } 
}  
Output:
1586

Next Article
Article Tags :

Similar Reads