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.
I too am not 100% sure what you are asking, but I suspect it can be answered by the classes Ulf mentions above. And in that case, this is not an advanced question, so I'll move this topic to a more appropriate form.