adding examples for different types of loops: LoopExample.java added