Hello Everyone

I am not sure if I am posting in the right place or not, but anyway the following is my problem.

I am totally confused with understanding the copyrights concept generally, and for published software codes specially. Usually I read tutorials from Java main site or from other sites, too, and they put on their sites pieces of code or a full code to make the reader try it and understand it. but I find sometimes in the very beginning of the code this statements:
* Copyright 1995 - 2008 Sun Microsystems, Inc. All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.

Does this mean that as long as I got the idea of the code from sun Microsystems site, I have to do what they requested? Even if I took just a piece of it in my code, or even if I modified it to suit my interest??

So I really do not understand the range of authority of tutorials' authors, as I thought that they make the free tutorial so that I can read it to get more experience and use it in the way I like.

Does this also mean that all tutorial over the net obligate me to do the same in case of using their published codes?

What is the game rules here?

Thank you