Check out example codes for "java android show toast". It will help you in understanding the concepts better.

Code Example 1

Toast toast = Toast.makeText(this, "message", Toast.LENGTH_LONG;);
    toast.show();

Code Example 2

Toast myToast = Toast.makeText(this, "I'm a toast!", Toast.LENGTH_LONG);
myToast.show();

Learn ReactJs, React Native from akashmittal.com