Unchecked or unsafe operations
<p>having trouble determining what is causing the java compiler to throw </p>

<pre><code>uses unchecked or unsafe operations.
</code></pre>

<p>The class that is doing it is as follows: </p>

<pre><code>import java.io.File;
import java.io.FileInputStream;
import java.util.Scanner;
import java.util.Vector;



public class Proj2 {

/**
 * args[0] the maximum depth of the trie
 * args[1] is the number of substrings to print
 * args[2] name of first file containing text
 * args[3] name of second file containing text
 * @param args
 */
public static void main(String[] args) throws Exception {
    String input = args[0];
    int one = 0;
    int two = 0;
    String a;
    String b;
    String[] tokens = input.split("\\s+");
    if (tokens.length != 4) {
        throw new IllegalArgumentException(
                "Argument must contain two integers and two filenames.");
    }
    try {
        one = Integer.parseInt(tokens[0]);
        two = Integer.parseInt(tokens[1]);
    } catch (Exception e) {
        System.out.println("First two arguments must be integers");
    }
    System.out.println("" + one + " " + two + " " + tokens[2] + " "
            + tokens[3]);
    try {

        Scanner sc1 = new Scanner(new File(tokens[2]));
        ;

        Scanner sc2 = new Scanner(new File(tokens[3]));
        String s = "";
        while (sc1.hasNext())
            s += sc1.nextLine();

        Character[] in1 = new Character[s.length()];
        for (int i = 0; i &lt; s.length(); i++) {
            in1[i] = s.charAt(i);
        }
        s = "";
        while (sc2.hasNext())
            s += sc2.nextLine();
        Character[] in2 = new Character[s.length()];
        for (int i = 0; i &lt; s.length(); i++) {
            in2[i] = s.charAt(i);
        }
        Trie&lt;Character&gt; tree1 = new Trie&lt;Character&gt;(in1,
                Integer.parseInt(tokens[0]));
        Trie&lt;Character&gt; tree2 = new Trie&lt;Character&gt;(in2,
                Integer.parseInt(tokens[0]));
        Vector&lt;Vector&lt;Character&gt;&gt; max = tree1.getMax(Integer
                .parseInt(tokens[1]));
        Vector&lt;Integer&gt; max_n = tree1.getMaxCount(Integer
                .parseInt(tokens[1]));

        System.out.println("Sequence    # in " + tokens[2] + "\t# in "
                + tokens[3]
                + "\n--------    --------------\t--------------");

        for (int i = 0; i &lt; max.size(); i++) {
            int n = 0;
            if (tree2.consist(max.get(i)))
                n = tree2.getCount(max.get(i));
            s = "";
            for (int j = 0; j &lt; max.get(i).size(); j++)
                s += max.get(i).get(j);
            System.out.println(s + "\t    " + max_n.get(i) + "\t\t\t" + n);
        }
    } catch (Exception e) {
        System.out.println("Incorrect file name");
    }

}

}
</code></pre>

<p>I've had to modify the class to catch more exceptions, and it was not throwing it before when I was using args[1], args[2] etc in place of parsing the tokens. But since I specify that those are Integers, I'm confused why the compiler is still throwing the error. Any insight would be much appreciated. Thank you. The code that is causing the error is instantiating the trees.</p>
