Here are some very useful resources for learning java, you
can find
many sample codes or examples in them.
1)http://www.javapractices.com/home/HomeAction.do
2)http://www.javabeginner.com/toc.htm
3)http://java4coders.com/
4)[url]http://vidyapsi.wordpress.com/category/java/ Think Differently[/url]