Code, Code, Code

This chapter is about step number 3: writing lots of code. Of course, not all code is equally good as a study aid. In general, we don’t mean you should write “production” code or a big desktop application with lots of Swing. What we DO mean is that you should write lots of small programs. On the real exam, most of the questions contain less than 13 lines of code. (To be sure, on the real exam you’ll often just see snippets of code that presumably exist in a larger program.) But while we were creating the questions for this book, we seldom wrote a program longer than 30 lines.

We recommend you write lots of “small” programs. There’s nothing magical about the 30-line limit, but there is a little bit of magic in setting up some sort of size constraint. If, when you are writing your test code, you keep it short, you’ll find that it helps you focus on exactly the Java idea you’re researching. The other benefit of short programs is that they’re easier to debug and fiddle with. If you study the questions in this book, you’ll see that, for the most part, they are very focused. You won’t see many getters or setters.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset