Bookmark that site, there are loads of code samples like that.
posted 10 years ago
I am surprised at that Question being the this Forum. It should be in the Java Beginners. Aravind, are you sure that is the question you wanted to ask? In any Java Book you would have got that answer. Not meaning to hurt you though if it was a genuine question. There is alway a start so keep posting and we will solve them