Java tutorial
//package com.java2s; import android.app.Activity; import android.content.Intent; import android.os.Bundle; public class Main { public static <T extends Activity> void start(Activity caller, Class<T> activityClass, Bundle params) { Intent intent = new Intent(caller, activityClass); if (params != null) { intent.putExtras(params); } caller.startActivity(intent); } }