Check out example codes for "how to set a variable java". It will help you in understanding the concepts better.

Code Example 1

float simpleInterest; //Declaring float variable
int time = 10, speed = 20; //Declaring and Initializing integer variable
char var = 'h'; // Declaring and Initializing character variable

Learn ReactJs, React Native from akashmittal.com