Open In App

Scala Int doubleValue() method with example

Last Updated : 30 Jan, 2020
Improve
Improve
Like Article
Like
Save
Share
Report

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


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads