Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Scala Int doubleValue() method with example

  • Last Updated : 30 Jan, 2020

The doubleValue() method is utilized to return the double value of the specified int value.

Method Definition: def doubleValue(): Byte

Return Type: It returns the double value of the given int value.

Example #1:




// Scala program of Int doubleValue
// method 
    
// Creating object 
object GfG 
{  
    
    // Main method 
    def main(args:Array[String]) 
    
        
        // Applying doubleValue method 
        val result = (15).doubleValue
            
            
        // Displays output 
        println(result) 
        
    
Output:
15.0

Example #2:




// Scala program of Int doubleValue
// method 
    
// Creating object 
object GfG 
{  
    
    // Main method 
    def main(args:Array[String]) 
    
        
        // Applying doubleValue method 
        val result = (1586).doubleValue
            
            
        // Displays output 
        println(result) 
        
    
}  
Output:
1586.0



My Personal Notes arrow_drop_up
Recommended Articles
Page :