For some simple cases, using single letters like i, j, k is enough, but as programs grow larger this becomes less informative. Number of days in a week Number of weeks in a year Minimum wage per hour 3. Comments Even carefully named variables are rarely sufficient to fully convey the operation of a program. They do not, for example, provide an explanation of a future feature that could be implemented because of how something is done now, or leave a detailed description of how a variable is computed. You can however place any additional information necessary in a comment.
Comments are plain text for humans to read.
From both design and documentation perspectives, it is a good idea to get in the habit of commenting your code as early as possible. For example, provide a brief description of what the program Coins4.java from Section 2.7 does. Add a comment to show when you modified the code, and what change you made. In this book, you can use a special ConsoleReader class to read input from the keyboard. If there is an error, the stream goes into a failed state instead of working with bad data.