Java
Let's play with Java class loader:
import java.lang.reflect.Field;
public class Loop {
public static void main(String[] args) throws Exception {
System.out.println("Let's loop");
Field field = ClassLoader.class.getDeclaredField("parent");
field.setAccessible(true);
field.set(Loop.class.getClassLoader(), Loop.class.getClassLoader());
}
}
This loop is actually so strong you'll have to use a kill -9
to stop it :-)
It uses 100,1% of my Mac's CPU.
You can try to move the System.out
at the end of the main function to experiment an alternate funny behavior.