Create loop.java

Adding loop class to repo