title: Samples of Scala and Java code where Scala code looks simpler/has fewer lines?
body: <p>I need some code samples (and I also really curious about them) of Scala and Java code which show that Scala code is more simple and concise then code written in Java (of course both samples should solve the same problem).</p>
  
  <p>If there is only Scala sample with comment like "this is abstract factory in Scala, in Java it will look much more cumbersome" then this is also acceptable.</p>
  
  <p>Thanks!</p>
  
  <p>I like most of all accepted and <a href="https://stackoverflow.com/questions/2952732/samples-of-scala-and-java-code-where-scala-code-looks-simpler-has-fewer-lines/2961620#2961620">this</a> answers</p>