Find length of non-repeated numbers in array
The correct data structure to use to eliminate duplicates is a Set. The String processing is more expensive, and the Map code is less clear because you don't care at all about the values.
It's nice to provide a vararg parameter so that clients don't need to define an array if they don't want to.
It's a better practice to return your result from the method. If the client wants to print it, that's up to them. But if you print it, and the client changes what they want to do with it, they're out of luck.
You can used the enhanced for loop to make your code a little prettier.
More descriptive names are better than less descriptive names.


If I were to take a stab at writing your code with the above changes in mind, it might look something like:

private static int countUniqueValues(final int... values) {
    final Set&lt;Integer&gt; uniqueValues = new HashSet&lt;&gt;(values.length);
    for (final int value : values) {
        uniqueValues.add(value);
    }
    return uniqueValues.size();
}