I'm trying to loop through a userSet with where the id's in the array userSet are Int. I keep getting this error: java.lang.Integer cannot be cast to java.lang.Long
Is there a simple way to do this? Casting variables are easy but is there an easy way to cast all variables in an array to Long? Very new to Java here.
Set <Long> userSet = getUniqueFollowers("/tmp/followers.txt")
for (long id : userSet) {
System.out.println("Starting twitter account: " + id);
long
? Because it seems to me that you could just useint
and it would work. – zneak May 14 at 0:47getUniqueFollowers
return? ---Set<Integer>
? – Elliott Frisch May 14 at 0:48Set
is not an array – RichN May 14 at 0:51