11_1

9_3[]

// 30 Integers
int [ ] integers = new int [0]{
}
// 100 floating point numbers
float [ ] floatPoints = new float [100]

// 56 Zoog Objects
Zoog [ ] zoogs = new Zoog [56]

9-4
1. Valid
2. Valid

5. Valid
6. Valid

9.5

Zoog [ ] zoogs = new Zoog [3]
zoogs [0] = new zoog ( 100, 100, 50, 60,16)
zoog [1] = new zoog (200, 200, 30, 40, 10)
zoog [2] = new zoog (50, 50, 5, 10, 2)

9.6
1. for (int i = 0; i < nums.length; i++){
nums [i] = nums[i] * nums[i];
}

2. for (int i = 0; i <nums.length; i++) {
nums[i] += int (10);
}

3. for (int i = 0; i < nums.length-1; i++) {
nums[i] += nums[i+1];
}

4. int [] nums = {2,4,5,7,6,8,5,2,8,10};
for ( int i = 0; i < nums.length; i++) {
nums [i] += nums.length;
}

Print this page
This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *