Java Reference
In-Depth Information
with curved boundaries requires advanced mathematical tools. Realistic modeling
of textures and biological entities requires extensive knowledge of mathematics,
physics, and biology.
122
123
CHAPTER SUMMARY
1. In order to implement a class, you first need to know which methods are
required.
2. A method definition contains an access specifier (usually public ), a return
type, a method name, parameters, and the method body.
3. Constructors contain instructions to initialize objects. The constructor name is
always the same as the class name.
4. Use documentation comments to describe the classes and public methods of
your programs.
5. Provide documentation comments for every class, every method, every
parameter, and every return value.
6. An object uses instance fields to store its stateȌthe data that it needs to execute
its methods.
7. Each object of a class has its own set of instance fields.
8. You should declare all instance fields as private.
9. Encapsulation is the process of hiding object data and providing methods for
data access.
10. Constructors contain instructions to initialize the instance fields of an object.
11. Use the return statement to specify the value that a method returns to its
caller.
12. A unit test verifies that a class works correctly in isolation, outside a complete
program.
Search WWH ::




Custom Search