CSCI 201 002, 26 September
- Suggestions for using DrJava
- Make your own copy of the bookClasses directory
- cp -r /opt/csci/lib/bookClasses ~/csci/201
- cut-and-paste
- Use hist files
- for setup sequences after resets
- avoid loops
- Simplified class structure
import
statements
- field declarations
- constructors
- methods
- methods
- headers
- modifier type name
(
parameters )
- For now, always use
public
as the modifier
- The type can be
void
if no value is to be returned
- returns
return
ends execution of the method
- When appropriate,
return
is given a value
this
- A special variable to name the object itself
- Generally can be omitted