title: Public vs Private inner classes in Java
body: <p>I was reading introduction to Java programming and it does not have a good explanation regarding this topic and it made me wonder why should someone use a private inner class in java instead of using a public one.</p>
  
  <p>They both can be used only by the outer class.</p>