Question: Rashed Rashed: Attempt 7 3 Question 2 (1 point) What is al2) after the following code? 6 int[J anew int[4]; for (int =0; ia.length; 1++)

 Rashed Rashed: Attempt 7 3 Question 2 (1 point) What is
al2) after the following code? 6 int[J anew int[4]; for (int =0;
ia.length; 1++) ata. length-1-i] 2i; 9 Your Answer: 12 Answer 15 Question
3 (1 point) Sunnose b is an array of String. What does
this code do? 00:00 Rashed Rashed: Attempt 7 Answer 3 Question 3
(1 point) Suppose b is an array of String. What does this
code do? Stringl] c b; c becomes a copy of b. and
b have the same size, but the values in c are all
nul. c points to the same array as b. It is an
error, since c and b do not have the same name. 9
12 15 Question 4 (1 point) How do you get the length
of an array called b? ngth: 1:00:00 Rashed Rashed: Attempt 7 1:
2 3 Question 4 (1 point) How do you get the length
of an array called b? 5 6 b.size; length(b) b.length; b.length0: 8

Rashed Rashed: Attempt 7 3 Question 2 (1 point) What is al2) after the following code? 6 int[J anew int[4]; for (int =0; ia.length; 1++) ata. length-1-i] 2i; 9 Your Answer: 12 Answer 15 Question 3 (1 point) Sunnose b is an array of String. What does this code do? 00:00 Rashed Rashed: Attempt 7 Answer 3 Question 3 (1 point) Suppose b is an array of String. What does this code do? Stringl] c b; c becomes a copy of b. and b have the same size, but the values in c are all nul. c points to the same array as b. It is an error, since c and b do not have the same name. 9 12 15 Question 4 (1 point) How do you get the length of an array called b? ngth: 1:00:00 Rashed Rashed: Attempt 7 1: 2 3 Question 4 (1 point) How do you get the length of an array called b? 5 6 b.size; length(b) b.length; b.length0: 8 9 11 12 14 15 Question 5 (1 point) What does the following code do? usned. Attempt 7 Question 5 (1 point) What does the following code do? intl] b - new int[5]; intll c b and c point to the same array, and all the elements of both are 3. b and c are arrays that both have the value 5 in them. b and c point to different arrays, dlil is 3, and bl]lis o. b and c point to the same array, and element 1 of that array is 3. nuostion 6 (1 point) 3 gth: 1:00:00 Rashed Rashed: Attempt 7 Answer 2 3 Question 7 (1 point) What code will set the last element of array b to 9? 5 6 9 b[ b.length ] = 9; bl b.length-11-9: bl-1] 9; 11 12 14 15 Question 8 (1 point) bl-1]-9; Question 8 (1 point) ++a will add one to the integer variable a. True False Question 9 (1 point) Which of the following are problems in the code below numbers ten to one in descending order? (indicate all th Rashed Rashed: Attempt 7 Question 9 (1 point) Which of the following are problems in the code below if the desire is to print the numbers ten to one in descending order? (indicate all that apply) for (int i-10; ie; i+); System.out.println(i); The variable i can't be used inside the loop because its scope is within the arentheses The semicolon after the loop definition should be removed. The increment ++ should be a decrement - The test prevents the loop from running even one time. Question 10 (1 point) 00:00 Rashed Rashed: Attempt 7 Question 12 (1 point) 3 Which for loop is equivalent the while loop below? int i-e; while (i 20) 6 /1 do something for (int i-O: i-20: itt) /do something"/) for (int i-20: i 0; i)/"do something/) for (int i-1; is20: i++) /do something"/) for (int i-20; i-0: i-/do something/) 2 Question 13 (1 point) :00 Rashed Rashed: Attempt 7 Question 13 (1 point) What line of code should be inserted to print all factors of 6 below 800? for (int i-800; i>0: i) // insert code here r G -- 6) System.out printin): if (1%6) System.out.println(i%6); if (1%6-:0) System.out.println(i); if (i/6-1) System.out.println(i); Rashed Rashed: Attempt 7 Question 14 (1 point) Suppose you want to print an nxn grid such that the border has x characters a the interior has dots. What code would you place at "// your code here"? nd for (int r-0; rsn; rt+) for (int cro; cn: ctt) // your code here System.out.println0: System.out.print("x"); else System.out.print(""); 1904938icfql-08dr Rashed Rashed: Attempt 7 Question 15 (1 point) Suppose you want to print an n x n grid of xs. What code would you place at "// your code here"? 112 for (int r-0; rsn.) for (int c=0; c<:>

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!