Update JavaMain.java

Implemented local checking routine and a commented for loop for numerous checks on an algorithm