What is the most efficient way to create emtpy ListBuffer ?

Posted by drypot on Stack Overflow See other posts from Stack Overflow or by drypot
Published on 2010-04-09T09:36:52Z Indexed on 2010/04/09 9:53 UTC
Read the original article Hit count: 139

Filed under:

What is the most efficient way to create emtpy ListBuffer ?

  1. val l1 = new mutable.ListBuffer[String]
  2. val l2 = mutable.ListBuffer[String] ()
  3. val l3 = mutable.ListBuffer.empty[String]

There are any pros and cons in difference ?

© Stack Overflow or respective owner

Related posts about scala