Scala list contains vs array contains

Viewed 6305

Out of interest why does this work in Scala:

val exceptions = List[Char]('+')    
assertTrue(exceptions.contains('+'))

but this not

val exceptions = new Array[Char]('+')    
assertTrue(exceptions.contains('+'))
2 Answers
Related