Explore BrainMass
Share

Explore BrainMass

    Comparison of C++ pointers and Java reference

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Please help with the following problem. Provide a detailed answer with references.

    Analyze and write a comparison of C++ pointers and Java reference variables. Use safety and convenience as the primary considerations in the comparison and also consider fixed heap-dynamics variables.

    © BrainMass Inc. brainmass.com October 9, 2019, 5:02 pm ad1c9bdddf
    https://brainmass.com/computer-science/memory-management/comparison-c-pointers-java-reference-46400

    Solution Preview

    Problem: Analyze and write a comparison of C++ pointers and Java reference variables. Use safety and convenience as the primary considerations in the comparison and also consider fixed heap-dynamics variables.

    Solution:
    Practically, a reference in Java acts similar to a pointer in C++ or even C. It refers to the address of a variable of object in memory. However, there are important usability and implementation differences. ...

    Solution Summary

    Understanding the differences in C++ pointers and Java references is a very important concept for those who are migrating Java codes to C and vice-versa, as well as for programmer who is learning a new language using comparison based learning methods. References are included as part of the solution.

    $2.19