Hi Ram,
Assertion allows you to
test your assumptions during development but the asertion code will not be present when you deploy the software. So there's no overhead and extra code. For example, if you assume that no negative numbers will be passed into your method:
private void yourMethod(int x)
{
assert (x >= 0); // throws AssertionError if "x" is negative
// proceed with rest of code
}
Also, it will help if you get at least one good book to help in your study. Do a search on "SCJP" at amazon.com.
SCJP books by Kathy Sierra and Bert Bates are very popular here. I believe you will enjoy reading their books.