infinite for loop in java break code example Example: java infinite for loop for(int i=0;i!=0;i++) return;