title: "public" val constructor parameter in Scala
body: <p>What is wrong with this declaration? Why is <code>public</code> not allowed in given code?</p>
  
  <pre><code>class Alpha( public val a:Int,public val b:Int)
  </code></pre>
  
  <p>It might seem a silly question, but is this due to encapsulation?</p>