RU beehive logo ITEC dept promo banner
ITEC 120
2008fall
aaray,
ejderrick,
ibarland,
jmdymacek

homeinfolabshwsexams
textbookjava.lang docsjava.util docsarchive

lect02b
fields; getter/setters

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.)

homeinfolabshwsexams
textbookjava.lang docsjava.util docsarchive


©2008, Ian Barland, Radford University
Last modified 2008.Sep.10 (Wed)
Please mail any suggestions
(incl. typos, broken links)
to iba�rlandrad�ford.edu
Powered by PLT Scheme