Can a for loop be written in Java to create an infinite loop or is it only while loops that cause that problem?
The way I made my server to run as long until I shut it down is
for(int i = 0;i<-1;i++){//code here}