Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.ArrayList;

public class Main {
    public static int countCommElmts(ArrayList<Integer> newScores1, ArrayList<Integer> newScores2) {
        int count = 0;
        for (int i = 0; i < newScores1.size(); i++) {
            if (newScores1.get(i) == newScores2.get(i))
                count++;
        }
        return count;
    }
}