|
Ah, setting up that switch to fall through in order to count the days in the year was clever. It looks good.
As far as Java style, it's more important to learn the basics of programming than learning the style at this stage, so code however you feel comfortable. Just realize that both your book and your teacher using incorrect style. Sun Microsystems is the final authority on the subject, as they are the ones who both own the intellectual property rights to Java and coordinate it's development, and their specs say what the correct style is. At some point in the future, when you feel comfortable working with Java you might want to try to switch styles.
|