Devry CIS 355A Week 1 Quiz latest

$14

Quantity:

Description

Devry CIS 355A Week 1 Quiz latest

  1. 1.Question : (TCOs 1–8) Every statement in Java ends with _____

a period (.).

a semicolon (;).

a comma (,).

an asterisk (*).

Question 2. Question : (TCOs 1–8) Analyze the following code.

public class Test {

public static void main(String[ ] args) {

int month = 09;

System.out.println(“month is ” month);

}

}

The program displays month is 9.0.

The program displays month is 09.

The program displays month is 9.

Question 3. Question : (TCOs 1–8) What is the printout of System.out.println(‘z’ – ‘a’)?

26

z

a

25

Question 4. Question : (TCOs 1–8) Analyze the following code.

boolean even = false;

if (even) {

System.out.println(“It is even!”);

}

The code is wrong. You should replace if (even) with if (even == true).

The code displays It is even.

The code displays nothing.

The code is wrong. You should replace if (even) with if (even = true).

Question 5. Question : (TCOs 1–8) The equal comparison operator in Java is _____

^=.

!=.

==.

<>.

Question 6. Question : (TCOs 1–8) After the continue outer statement is executed in the following loop, which statement is executed?

outer:

for (int i = 1; i < 10; i ) {

inner:

for (int j = 1; j < 10; j ) {

if (i * j > 50)

continue outer;

System.out.println(i * j);

}

}

next:

The program terminates.

The statement labeled next.

The control is in the outer loop, and the next iteration of the outer loop is executed.

The control is in the inner loop, and the next iteration of the inner loop is executed.

Question 7. Question : (TCOs 1–8) How many times will the following code print “Welcome to Java”?

int count = 0;

while (count < 10) {

System.out.println(“Welcome to Java”);

}

0

1

10

9

8

Question 8. Question : What is Math.ceil(3.5)?

4.0

5.0

3.0

3

Question 9. Question : What is k

after the following block executes?

{

int k = 2;

nPrint(“A message”, k);

}

System.out.println(k);

1

2

0

The variable k is not defined outside the block, so the program has a compile error.

Question 10. Question : Analyze the following code.

public class Test {

public static void main(String[ ] args) {

int[ ] a = new int[4];

a[1] = 1;

a = new int[2];

System.out.println(“a[1] is ” a[1]);

}

}

The program displays a[1] is 0.

The program displays a[1] is 1.

The program has a compile error because new int[2] is assigned to a.

The program has a runtime error because a[1] is not initialized.

 

DeVry Courses helps in providing the best essay writing service. If you need 100% original papers for Devry CIS 355A Week 1 Quiz latest, then contact us through call or live chat.

Devry CIS 355A Week 1 Quiz latest

Best Devry CIS 355A Week 1 Quiz latest

Devry CIS 355A Week 1 Quiz latest