title: Scala - what is case class private
body: <p>I am analyzing my existing project, I found some this like this(conceptually):</p>
  
  <pre><code>case class AA private(id: String) {}
  
  case class BB(id: String) {}
  </code></pre>
  
  <p>After I created those two classes to observe the difference. I analysed their java source by using java decompiler. I did not find any different. </p>
  
  <blockquote>
    <p>What is the need of private there. </p>
    
    <p>What is the importance of that.</p>
  </blockquote>