Explore BrainMass

Explore BrainMass

    Access the array 4 Java program

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

    Access the array 4 Java program. Code, compile, and run the program. There are four lines of code marked (1)..(4) that you must explain after analyzing the code, running the program, and examining the output. Post to the Answer Forum an explaination of each of the lines of code (1..4), that is, what the code does syntactically and what it does in the program.

    © BrainMass Inc. brainmass.com March 4, 2021, 6:04 pm ad1c9bdddf
    https://brainmass.com/computer-science/java/access-the-array-4-java-program-26868

    Attachments

    Solution Preview

    Here is the explaination of the lines. I also included it in the attached file array4.java.
    Line 1:
    int[] ints1 = new int[max]; //(1)creates array of integers whose size is the value of max(20 in this case); array elements initialized to zero (1)

    Line 2:
    ints1[0]= x++ + y++; // (2) assign the value of x+y to intsl[0], the array element whose idex is 0. then increase the value of x by 1, and increase the ...

    Solution Summary

    This job accesses the array 4 Java program.

    $2.49

    ADVERTISEMENT