Not quite sure I understand your question.
Vishal Hegde wrote: // here does entrySet adds all its items in a SET?
The entrySet method creates a Set with all the entries in.
No. It is an interface nested inside the Map interface.
// Is Entry some static variable that adds the elements of set in a Map
Your post would be easier to understand if you wrote the questions outside the code tags.
Why have you not given the Map type parameters? It would be a lot easier to handle a Map<String, Integer>.
Interface can be nested??
By that you mean is-a relationship ,right using extends keyword?
// Edit: Just to clarify. My no is the answer to the question: By that you mean is-a relationship ,right using extends keyword?
Yes. Open the src.zip file in your Java™ installation folder and you can see how it is done
Vishal Hegde wrote: . . . Interface can be nested??
No. Not at all.
. . . By that you mean is-a relationship ,right using extends keyword?