java and cpp versions