String[] names = new String[namesListSet.size()];		
int[] nums = new int[namestimesSet.size()];
for (String s : names) {

i'm getting an error on the bold part. getting symbol not found.

Seemingly it would have to be an Integer array, not an int array, although it would probably help to know exactly what "namestimesSet" is, I'm assuming a Set<Integer>.