A comment is a part of your program that doesn’t do anything; it’s a note for the reader.
This might not sound very useful at first, but you would be amazed at how quickly you’ll forget what you were thinking a day, week, or year ago.
A good rule of thumb to keep in mind is Eagleson's Law: "Any code of your own that you haven't looked at for six or more months might as well have been written by someone else."
There are two ways to add comments:
public class Hello
public static void main(String args)
System.out.print("Hello World"); // hi there!
// this is also a comment
/* this is useful for
when you have a comment
that goes across many lines */