Considere o código criado com Linguagem de Programação Scala, em condições ideais, a seguir:
object Main {
def main(args: Array[String]): Unit = {
println(soma(2, 3))
}
}
O código correto da função soma é:
object Main {
def main(args: Array[String]): Unit = {
println(soma(2, 3))
}
}
O código correto da função soma é:
- A)def soma(x: Int, y: Int): Int = { x + y }
- B)def soma(x: int, y: int): int = { x + y }
- C)def soma(x: Integer, y: Integer) {return (x + y)::Integer }
- D)def soma(x: Double, y: Double) { (x + y):: Double }
- E)def soma(x: Decimal, y: Decimal): Decimal = { x + y }