I write a code sample about calculate the aritmetic mean,i did lots of thing but some parts are missing/incorrect.

This is my code sample : 

```
public static void main(String[] args) {
    int i;
    int j;
    int thelargest;
    int thesmallest;

    Scanner input = new Scanner(System.in);
    System.out.println("Enter the list of number : ");
    String input2 = input.nextLine();

    String[] numbers = input2.split("\\s+");

    int[] result = new int[numbers.length];
    for (j = 0; j < numbers.length; j++) {
        result[j] = Integer.parseInt(numbers[j]);

    }

    for (i = 0; i < result.length; i++) {
        System.out.print("");
        System.out.println(result[i]);
    }

    System.out.println("The Largest Number :  "
            + findTheLargestNumber(result));
    System.out.println("The Smallest Number :  "
            + findTheSmallestNumber(result));
    thelargest = findTheLargestNumber(result);
    thesmallest = findTheSmallestNumber(result);
    float arithmeticMean = (float) (result[i + j])// result.length;
            System.out.println("The Arithmetic Mean : " + arithmeticMean);

```

/\*There is a mistake and I tried to solve it but I didn't find any way to solve it.I want my programme to sum the results(numbers) and divide into number of result.(For example :10+20+30=60 and the aritmetic mean is 60/3=20.)Lastly,I think the mistake is about (float)(result[i+j]).

\*/

```
}

public static int findTheSmallestNumber(int[] series) {
    int thesmallest = series[0];
    for (int i = 1; i < series.length; i++) {
        if (series[i] < thesmallest) {

            thesmallest = series[i];
        }
    }
    return thesmallest;
}

public static int findTheLargestNumber(int[] series) {
    int thelargest = series[0];
    for (int i = 1; i < series.length; i++) {
        if (series[i] > thelargest) {

            thelargest = series[i];
        }
    }
    return thelargest;
}

```

}

Thanks for everbody which gonna help to me .