This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
We'd appreciate if you show some effort first rather than ask for code directly.
What you've asked for is the most basic of things; Official documentation, sample examples bundled with SDK, Google search will find you many resources.