Check out example codes for "gat environment variables java". It will help you in understanding the concepts better.

Code Example 1

String environmentVariable = System.getEnv("environment_variable_name"); 
//You can create environment variables on your computer manually
//and then you must put the environment variable in the parantheses as a String

Learn ReactJs, React Native from akashmittal.com