![]() |
![]() |
|
home—info—labs—hws—exams
textbook—java.lang docs—java.util docs—archive
An object has ______ and _______.
Exercise: print the following on the console window:
The length of the String "Dubble Bubble Bubble Gum"
after replacing each "bb" with "zzz"
Syntax for ...
- calling a method
- (calling a void method?!)
- calling a constructor
- declaring a variable
- initializing a variable
(recall an example of each;
which of these require semicolons?
Look at some statements -- where is
the semicolon coming from?)
- Create java.awt.Rectangle
- inspect it
Draw picture on board!
- call getters: getX, getY, getWidth, ...
- call some "mutators": setSize, setLocation;
(Note how the getters return different answers;
also, see the inspect-window change.)
home—info—labs—hws—exams
textbook—java.lang docs—java.util docs—archive
| ©2008, Ian Barland, Radford University Last modified 2008.Sep.10 (Wed) |
Please mail any suggestions (incl. typos, broken links) to ibarland |
![]() |