![]() |
![]() |
|
In today's lecture, we saw how to declare arrays of any size,
double[] nums;
double[] data;
nums = new double[]{3,4,5};
data = new double[12];
data[3] = 33.3;
data[4] = 44.4;
data[3] = Math.sqrt(3);
int i;
while (i < Object120.length(nums2)) {
data[i] = Math.sqrt(i);
i += 1;
}
|
for (int i=0; i < Object120.length(data); i += 1) {
data[i] = 2*Math.sqrt(i);
}
|
for ( var-init ; test ; end-of-loop-update ) {
body
⋮
}
|
assertEquals( new String[]{"really-no","no-bye","bye-really"}, appendPairs(new String[]{"really","no","bye"}) );
|
This page licensed CC-BY 4.0 Ian Barland Page last generated | Please mail any suggestions (incl. typos, broken links) to ibarland |