Verifying if two numbers are equal using ArrayLists I have some question about the code below. It works correctly, but:

Is there a better/another way to solve the exercise (as an expert would have done:) or mine it's perfectly done?
Also, I don't see the point of using ArrayList instead of a normal vector like int a[].
In the method analysis I wanted to set as parameters (ArrayList a,ArrayList b) but an error (incompatible types List cannot be converted to ArrayList) appears in this int a = Testing.analysis(seq1, seq2, t1); line. I thought  I was working with ArrayList since I instantiated my sequences as such.

Exercise:

Perform a program that uses a function that returns a 1 if two very large numbers (digits greater than 5 and where each digit is an element of the arrayList) are equal and a 0 otherwise.
    Example 1:
    Entry
    Number 1: 2 3 4 5 6 7
    Number 2: 1 4 6 8 9 0
    Output &quot;They are not equal numbers&quot;


class Testing {

static int analysis(List a, List b, int t) throws Exception { //using 
//ArrayList instead of List marks an error, why?

    int c = 0;

    if (a.size() == b.size() &amp;&amp; a.size() &gt; 5) {

        for (int i = 0; i &lt; t; i++) {
            if (a.get(i) == b.get(i)) {
                c++;
            }
        }
    } else {
        System.out.println(&quot;oops! the lengths are not the same or some 
    of the sequence is less than 6&quot;);
        throw new Exception(); //to finish the method
    }

    if (c == t) {
        return 1;
    } else {
        return 0;
    }

}
}

public class Tarea24agoENGLISH {

public static void main(String[] args) throws Exception {
    Scanner q = new Scanner(System.in);

    List seq1 = new ArrayList(); //I wanted to write this List &lt;int&gt; seq=new ArrayList&lt;int&gt;(); but it marked an error, why?
    System.out.println(&quot;Introduce the length of the sequence1 &quot;);
    int t1 = q.nextInt();

    for (int i = 0; i &lt; t1; i++) {
        System.out.println(&quot;Introduce the digits for sequence1&quot;);
        int n = q.nextInt();
        seq1.add(n);
    }

    List seq2 = new ArrayList();
    System.out.println(&quot;Introduce the length of the sequence2&quot;);
    int t2 = q.nextInt();

    for (int i = 0; i &lt; t2; i++) {
        System.out.println(&quot;Introdce the digits for sequence2&quot;);
        int n = q.nextInt();
        seq2.add(n);
    }

    int a = Testing.analysis(seq1, seq2, t1);
    if (a == 1) {
        System.out.println(&quot;same numbers&quot;);
    } else {
        System.out.println(&quot;\n different numbers&quot;);
    }

}

}
First thing I noticed don't count how many digits are equal, soon as 1 digit is unequal return false, if the loop finishes return true.  Also it seems to me if the sizes are unequal the proper response would be false not an error.