title: Not able to access parent class variable in child class in kotlin
body: <p>In kotlin I am trying to use parent class variables in child class but I am not able to use them ,as I am new to kotlin I don't understand how to do it simply </p>
  
  <p>I am trying to access sharedPerfernces and getting but its giving me null</p>
  
  <pre><code>class webViewActivity : AppCompatActivity{
  
   internal var shared_preferences: SharedPreferences? = null
  
  
  override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          shared_preferences = this.getPreferences(Context.MODE_PRIVATE)
  
          mContext = this
      }
  
  
  class JavaScriptInterface(private val mContext: Context) {
  
   @JavascriptInterface
          fun exampleGet(path: String): String {
              return webViewActivity().shared_preferences!!.getString(path, "")
  
  //here shared_perferences is null 
          }
  }
  
  
  
  }
  </code></pre>
  
  <p>why I am not able to access parent class variables without constructor of parent class in child class . give me some suggestion ,little help will be appreciated</p>