private static final Set sessions = Collections.synchronizedSet(new HashSet());
I am storing sessions in a Set type reference variable called sessions
s shown above.
Now, I want to iterate over these:
for(Session s : sessions){}
However, I get a Type Mismatch error at it that says
Can not convert from element type Object to Session
How do I fix this ?