Check out example codes for "java startActivity crash". It will help you in understanding the concepts better.

Code Example 1

Intent i = new Intent(CONTEXTOFYOURCURRENTACTIVITY , YOURFUTUREACTIVITY.class);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
MainActivity.context.startActivity(i);

Learn ReactJs, React Native from akashmittal.com