Ways in which Java program is less likely to be compromised

Give two ways in which a Java program is less likely to be compromised than the same program written in C++.

E

Expert

Verified

In Java, Primitive and reference data types always passed by value while as in C++ referenced data types are passed by reference.

In Java, we have automatic garbage collection that doesn’t have the concept of Destructor and usage of finalize() is not recommended while have we have to explicitly rely upon destructors and deletete operator to free unused memory.

   Related Questions in Programming Languages

©TutorsGlobe All rights reserved 2022-2023.