To make your Java code perform as it shouldthat is, with as few snags as humanly and technically possiblethere are certain general rules programmers must follow. These are mostly common-sense solutions, such as using established coding conventions, making sure that the code style is standardized so that a team can best utilize it, and making the code readily available for testing at regular intervals.
In the end, your code should be as simple and as accessible (meaning without hidden data) as possible, with the development and milestone ground rules clearly spelled out so that everybody working on the project is on the same page throughout the entire cycle. If you follow these rules closely, your code should require fewer adjustments, test better, and perform at an optimum level.
With that in mind, this article contains 10 key maxims for efficiently implementing Java code. Read on ...
Editor's Note: The tips published here are excerpted from Bruce Eckel's book, "Thinking in Java, Second Edition," (Prentice Hall, 2000). It is the second in a series of articles in which Eckel shares his explicit advice on Java development, design, and implementation.