Question: P4) Both Java and CH use new operator to create an explicit-heap variable. The following statement shows an example in Java. I int[] x=new int
P4) Both Java and CH use "new" operator to create an explicit-heap variable. The following statement shows an example in Java. I int[] x=new int [10]; (a) In CH, you should use a de-allocate operator after such as "delete at the end of the variables' lifetime. Explain why. (b) However, Java does not have any de-allocation feature. Why? Explain
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
