Update loop.java

Finished loop methods