A data type in Scala instructs the compiler about kind of value that needs to be stored in a specific location. In Scala, there are no primitive data types because everything in Scala is treated as an object.

Here are the data types:
  • Byte
  • Short
  • Int
  • Long
  • Float
  • Double
  • Char
  • String
  • Boolean
  • AnyRef
  • Nothing
  • Null
  • Unit
  • Any

Suggest An Answer