RU beehive logo ITEC dept promo banner
ITEC 120
2009spring
ibarland
nokie
jmdymacek

homeinfolectslabsexamshws
textbooktutor/PIsjava.lang docsjava.util docs

lect02a
practice with variables

Quick review:

Suppose we work for Olympic swimming, and want to track the results for an race entrant:

Example: Example: Michael Phelps, in lane 4, swam in 49.27 seconds.
  1. Declare a variable which can hold the swimmer's lane-number. (Think about which type to use.) Call your variable it something suggestive (e.g. `frameNum` is better than `q`).
  2. Initialize it to a reasonable value.
Repeat (a),(b) for a swimmer's name and a swimmer's time.

Today we'll discuss and practice:


1We won't talk about null in this class: the only way it arises is if you forget to initialize a field.      

homeinfolectslabsexamshws
textbooktutor/PIsjava.lang docsjava.util docs


©2009, Ian Barland, Radford University
Last modified 2009.Jan.30 (Fri)
Please mail any suggestions
(incl. typos, broken links)
to iba�rlandrad�ford.edu
Powered by PLT Scheme