Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- scala> def putInt(l:collection.mutable.ListBuffer[Any]) { l += 0 }
- putInt: (l: scala.collection.mutable.ListBuffer[Any])Unit
- scala> import collection.mutable.ListBuffer
- val list = new ListBuffer[String]
- import collection.mutable.ListBuffer
- scala> list: scala.collection.mutable.ListBuffer[String] = ListBuffer()
- scala> putInt(list.asInstanceOf[ListBuffer[Any]])
- scala> println(list)
- ListBuffer(0)
Advertisement
Add Comment
Please, Sign In to add comment