I created a large array of random integers and calculated sum and average of odd integers between 25 and 75 (inclusive). So far the program is running but the result its giving is too long in other words its showing every addition and average step individually how can i displayed the result after all calculations are completed

```
    import java.util.*;

    class ArraySUMAVG {

    public static void main(String[] args) {

    System.out.println("calculating Arrays...");

    String name = "os.name";

    System.out.println("Name: " + System.getProperty(name));

    String version = "os.version";

    System.out.println("Version: " + System.getProperty(version));

    String architecture = "os.arch";

    System.out.println("Arch: " + System.getProperty(architecture));

    String[] array = new String[1312500];

    int size = array.length;

    System.out.println("Size of the Array is: " + array.length);

    System.out.println("Total number of system cores(processors): " + Runtime.getRuntime().availableProcessors());

    System.out.println("The Size of Array is divisible by the size of Processors(1312500/4): " + array.length/Runtime.getRuntime().availableProcessors());

    Random r = new Random();

    int[] values = new int[1312500];    

    int sumarray=0; 

    int CountD=0;

    for(int i = 0; i < values.length; i++) {

    int randomint = r.nextInt(100);

    values[i] = randomint;

    if((values[i]%3 == 0) && (values[i] >=25 && values[i] <=75)){

    int Sum = sumarray += values[i];

    CountD++;

    int Average = sumarray/CountD;

    System.out.println("The Sum is: " + Sum);

    System.out.println("The Average is: " + Average);

    }
    }
    }
    }

```

the result is:

```
    The Sum is: 11411853

    The Average is: 51

    The Sum is: 11411901

    The Average is: 51

    The Sum is: 11411961

    The Average is: 51

    The Sum is: 11412033

    The Average is: 51

    The Sum is: 11412069

    The Average is: 51

    The Sum is: 11412123

    The Average is: 51

```

how can i cut this calculations