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

  • Q : What is an Unary operator What is an

    What is an Unary operator: It is an operator which takes a single operand. Java's unary operators are as -, +, !, !, ++ and --.

  • Q : Define Binary search Binary search :

    Binary search: This is a search of sorted data, in which the middle place is examined first. The search continues with either the right or the left part of the data, therefore removing half the remaining search space. This procedure is repeated at eac

  • Q : Define Static nested class Static

    Static nested class: It is a nested class with static reserved word in its header. Dissimilar inner classes, objects of static nested classes contain no enclosing object. They are as well termed as nested top-level classes.

  • Q : Passing by address or reference Passing

    Passing by address or reference: In this technique no separate memory build for formal variables that is, formal variables share similar location of actual variables and therefore any change on formal variables automatically reflected back to real var

  • Q : Types of rings in CPU Name the

    Name the different kinds of rings presented in CPU?

  • Q : Role of ScriptManagerProxy control?

    Explain the role of ScriptManagerProxy control?

  • Q : Explain LURCH LURCH (Menzies et al.

    LURCH (Menzies et al. 2004) uses random search to explore a state machine’s state space. Because the search is random, it gives no guarantee that the state space has been exhaustively explored, so LURCH cannot be used for verification. However,

  • Q : Write a program that initializes an

    Write a program that initializes an integer array a[20] with values {0, 1, 2, 3, ...18, 19 - once each} then scrambles them up and prints the values in random order. For example: 19 2 3 8 11 1 4 17 7 15 9 0 16 12 18 13 5 6 10 14    

  • Q : What is u-area Explain what is meant by

    Explain what is meant by the term u-area (user area)?

  • Q : Define Out of scope Out of scope : It

    Out of scope: It is a variable is in scope as long as the program's flow of control is in the variable's defining block. Or else, this is out of scope.

©TutorsGlobe All rights reserved 2022-2023.