Commenting the Public Interface, Part 2 – Intro to Java Programming

Now you make think it’s a bunch of trouble to add all these comments into your code but let me show you something. Here is a part of the documentation of the java string class. When you scroll through it you’ll see someone wrote a lot of documentation here, and actually let me tell you who that someone was. You can get the source code for the string class, it’s a part of the java development kit. So, here is a part of the actual source code, here is a method and over here. The programmer wrote a pretty long java.comment and not just one. If you scroll through this file, you will see that every method has a comment. Here’s another one and you’ll see that every method has a comment so if the programmer that give us java can write those comments, so can you.

Leave a Reply

Your email address will not be published. Required fields are marked *