title: Kotlin access modifiers
body: <p>I'm trying and learning Kotlin and came across a confusion with regards to access modifiers, in contrast to Java, Kotlin has Private, Public, Internal and Protected access modifiers, </p>
  
  <p>So is internal same as package ? A small example :</p>
  
  <pre><code>package A
  
  private fun foo() {} // visible inside example.kt
  
  public var bar: Int = 5 // property is visible everywhere
      private set         // setter is visible only in example.kt
  
  internal val baz = 6 // visible inside the same module
  </code></pre>