Java modifications

Added more code to Java test.