created JavaTest.java to test java implementation