If the latter phrasing is correct, use that. If you really do need Java or C++ specifically, then use the former.