title: How to pass a class to a function in Kotlin
body: <p>I am trying to pass a class as an argument in Kotlin so that I can reuse a method, how would I convert this Java function to a Kotlin function?</p>
  
  <pre><code> public void goToActivity(Activity activity, Class classs) {
      Intent intent = new Intent(activity, classs);
      context.startActivity(intent);
      activity.finish();
  }
  </code></pre>