Calculate the total score of batsman - Java Quiz Question


Write a program to calculate the total score of batsman.

Input (List) Output (int)
[10, 24, 111, 155, 54, 48, 99, 98, 134, 78, 94, 82, 0, 12] 999
[121, 34, 44, 123, 32, 4, 2, 65, 67, 0, 13, 0] 505


import java.util.*;
class GetBatsmanTotalScore
{
    public static void main(String s[])
    {
        List<IninngsActivity> ininngsActivity = new ArrayList<IninngsActivity>();
        ininngsActivity.add(new IninngsActivity(120));
        ininngsActivity.add(new IninngsActivity(100));
        ininngsActivity.add(new IninngsActivity(0));
        ininngsActivity.add(new IninngsActivity(12));
        ininngsActivity.add(new IninngsActivity(112));
        ininngsActivity.add(new IninngsActivity(54));
        ininngsActivity.add(new IninngsActivity(0));
        ininngsActivity.add(new IninngsActivity(56));
        ininngsActivity.add(new IninngsActivity(23));
        System.out.println("The total score is : " + getTotalScore(ininngsActivity));

    }


    private static int getTotalScore(List<IninngsActivity> ininngsActivities) {
    }

}
class IninngsActivity {

int runs;

public IninngsActivity(int runs) {
this.runs = runs;
}
}