September 24, 1997

Helping the Java Garbage Collector

When you create an object in Java, such as in the following code: Button b = new Button(); Java creates a new Button object in memory and sets the value

Include Test Code in Your Classes

It is important for developers to test code that they write to insurethat they are meeting the specifications for their application. Oftentest code is built in a separate program which

Allow the Java Compiler to Remove Debug Code

The Java compiler will optimize your application by removing code thatcan never be executed. If you include a class in your application suchas the following: public class Debug{ public static

Increase Code Reusability

Instead of exposing fields of a Java class, such as in thiscode: public class Person{ public String firstName; public String lastName;} use private fields and provide access to the information