Fix and add java exercise file