Pular para o conteúdo principal

Questão de TI - Ciência de Dados e Inteligência Artificial — Scala — FCC 2023

TI - Ciência de Dados e Inteligência ArtificialScala
Código
fc144550
Banca
FCC
Órgão
TJ BA
Ano
2023
Cargo
AJ ( )
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 !unção soma é:
  1. Adef soma(x : Int , y : Int) : In = { X + y }
  2. Bdef soma(x : int , y : int) : int = { X + y }
  3. Cdef soma(x : Integer, y : Integer) {return (x + y) : : Integer
  4. Ddef soma(x : Double, y : Double) ( {x + y) :: Double }
  5. Edef soma(x : Decimal, y : Decimal) : Decimal = { X + y }
Revelar gabarito e comentário

GabaritoA — def soma(x : Int , y : Int) : In = { X + y }

Link permanente: /questoes/fc144550