Skip to content
Related Articles

Related Articles

Improve Article

Scala Int intValue() method with example

  • Last Updated : 30 Jan, 2020

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 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 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



My Personal Notes arrow_drop_up
Recommended Articles
Page :