<Tr> <Td> std:: cout <<d. x <<std:: endl; / / outputs 5, because d references the / / same object to which c points </Td> <Td> System. out. println (d. x); / / outputs 5, because d references the / / same object as c </Td> </Tr> <Ul> <Li> In C++, it is possible to declare a pointer or reference to a const object in order to prevent client code from modifying it . Functions and methods can also guarantee that they will not modify the object pointed to by a pointer by using the "const" keyword . This enforces const - correctness . </Li> <Li> In Java, for the most part, const - correctness must rely on the semantics of the class' interface, i.e., it is not strongly enforced, except for public data members that are labeled final . </Li> </Ul> <Li> In C++, it is possible to declare a pointer or reference to a const object in order to prevent client code from modifying it . Functions and methods can also guarantee that they will not modify the object pointed to by a pointer by using the "const" keyword . This enforces const - correctness . </Li> <Li> In Java, for the most part, const - correctness must rely on the semantics of the class' interface, i.e., it is not strongly enforced, except for public data members that are labeled final . </Li>

Distinguish the programming concepts between java and c++