Skip to main content\(
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Section 9.2 Arrays-WE1-P1
Subsection 9.2.1 Subgoals for Evaluating Arrays
Set up array from 0 to size-1
Evaluate data type of statements against array
-
Trace statements, updating slots as you go
Remember assignment subgoals
Subsection 9.2.2 Arrays-WE1-P1
Exercises Exercises
1.
2.
3.
Q3: Which line produces the first compiler error?
double [] gamma = new double[5];
gamma[0] = 14;
gamma[1] = gamma[0];
gamma[gamma[0]] = 42;
gamma[5] = 22;
You have attempted
of
activities on this page.