Now I'm working on Socket Server, and made multi-thread for muliti-clients for a socket. and Also put each thread of the connection into a HashMap to store the Objects of threads.
Here's the problem: I can't get returned keyset of the HashMap into Iterator. I initialized the key value as . What's the problem? I have no Idea.
HashMap<Long, ClientThread> m_clients;
long m_currentKey;
m_clients.put((Long)m_currentKey, clientThread);
Iterator<Long> itr = m_clients.keySet().iterator(); //error:: Why?

The answer is in the question. You're using the type HTMLDocument.Iterator, instead of using java.util.Iterator.
Fix your imports.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With