write an infinite loop java

Java
while(true) {
  //do whatever
}
Source

Also in Java: