|
|
Authorized user can see question and answers. Please log in or sign up. 
|
#91. Given: 3. int num = 0, count; 4. while ( num < 3 ) { 5. num++; 6. // insert code here 7. System. out. println("num = " + num + " : count = " + count ); 8. } 9. }
Which, inserted at line 6, produces the following output? num = 1 : count = 1 num = 1 : count = 2 num = 2 : count = 1 num = 2 : count = 2 num = 3 : count = 1 num = 3 : count = 2
Show comments for this question (0)
Add comments
Link to this question
|
|
#97. You need an algorithm that must: • Iterate through an array of primitive integers • Print the value of each array element in index order • If the value of the element is equal to 10, print the value of the element, and then terminate the iteration Which method correctly implements the algorithm?
Show comments for this question (0)
Add comments
Link to this question
|
|
#99. You need an algorithm that must: · Print the characters of a String, in index order · Skip all instances of the character 'a' that appear in the String Given: 2. public void foo (String s ) { 3. // insert code here 4. }
Which two, inserted independently at line 3, correctly implement the algorithm? (Choose two.)
Show comments for this question (0)
Add comments
Link to this question
|
|
|
|
gen. 0.255
|
Server date 05:57 10-01-2009
|
Developed by Zip © 2006
|
|
 |
|
|