Hi Rohan,
Adding to Chandra,
Consider small example
boolean volatile No_Reply[] = {true , true, true, true};
String[] bartenders = { "Bert Bates", "Henry Wong", "Barry Gaunt","Marc Weber" };
for (byte i=0; i < bartenders.length ; i++){ synchronize(bartenders[i]){
if(No_Reply[i]){
S.o.p("I am longing for you: "+ bartenders[i]);
bartenders[i].wait(10000);
if ( i == bartenders.length -1) i = -1;
// Concentrate Here
// Here you need to take care you want i be inited with 0
// but here you can't put i=0; because next i++ executes,
// thus i becomes 1 and 1 < bartenders.length evaluates.
}
}
Thats the intent of warning given in your post.