title: Advantages of Scala's type system
body: <p>I am exploring the Scala language. One claim I often hear is that Scala has a <em>stronger</em> type system than Java. By this I think what people mean is that:</p>
  
  <ul>
  <li><code>scalac</code> rejects certain buggy programs which <code>javac</code> will compile happily, only to cause a runtime error.</li>
  <li>Certain invariants can be encoded in a Scala program such that the compiler won't let the programmer write code that violates the condition.</li>
  </ul>
  
  <p>Am I right in thinking so?</p>