This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Tekchand Prasad, thank you for replying, but please don't simply give the explanation. It does the original poster no good; it is much better if they work it out for themselves. Please have a look at this FAQ, as well as the heading of the beginner's forum page. Please don't be annoyed with me, but I have deleted the code copied with the little explanations.