Can a for loop be written in Java to create an infinite loop or is it only while loops that cause that problem?
Sure you can
for(int i = 0; i == i; i++) {}
Any loop can be made infinite as long as you make a way to never hit the exit conditions.