Max Num In Scala

[Solved] Max Num In Scala | Swift - Code Explorer | yomemimo.com
Question : max num in scala

Answered by : varun-pandian

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

Source : https://www.geeksforgeeks.org/scala-int-max-method-with-example/ | Last Update : Thu, 20 Oct 22

Answers related to max num in scala

Code Explorer Popular Question For Swift