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

Code Example 1

int index = -1, i;//What is this type of declaration
// Nothing but 
int index = -1
int i;

String s = "hi",stri; //What is this type of declaration
// Nothing but 
String s = "hi";
String stri;

Learn ReactJs, React Native from akashmittal.com