I am not able to understand how to write Java code to implement Verify. I am always seeing the code to implement Assert but not for Verify
You must use the TestNG framework which only supports Assert statements. It doesn't support Verify statements. You can visit the following URL for TestNG Javadoc:
http://testng.org/javadocs/
From http://seleniumonlinetrainingexpert.wordpress.com/2012/11/20/what-is-the-difference-between-assert-and-verify-in-selenium/
When Assertion fails all test steps after that line of code are skipped When a “verify” fails, the test will continue executing and logging the failure.
If you want to use Verify statements then you will have to use the Junit framework.