I have a dongle with Docomo sim card and i want to write java code such that when i click on connect button my dongle will establish internet connection please need help. good if provide code.
Else at least let me know what i have to read for that to know
This site is NotACodeMill(⇐click), so nobody here will give you the code.
As for what you're trying to do, "establish an internet connection" is pretty vague. The simplest way I can interpret it is that you want to open a socket to some host. That can be done with java.util.Socket, and you can google for something like java networking tutorial for an intro and examples.
If you have a more specific question, or get stuck on some particular part, come back and post the details.