if (mycoll.contains("hello")) { // Its there }
Programming Tips - Scala: How can I check if an element is present in a collection?
Date: 2014feb8
Language: Scala
Q. Scala: How can I check if an element is present in a collection?
A. Use the contains() method.