What is the value of x after the following code segment executes, if y is 20 and z is 2?

switch (y – z)
{
case 20: x = y + z; break;
case 21: x = y; break;
case 22: x = z; break;
default: x = y * 2;
}


40

Computer Science & Information Technology

You might also like to view...

When applied to instance variables, the ________________ visibility modifier enforces encapsulation.

a) static b) final c) public d) private e) none of the above

Computer Science & Information Technology

To create an InputStream to read from a file on a Web server, you use the method __________ in the URL class.

a. getInputStream(); b. obtainInputStream(); c. openStream(); d. connectStream();

Computer Science & Information Technology

All of the following statements are TRUE regarding collaboration EXCEPT:

A) Collaboration allows workbooks to be shared among different users and then merged together for a final product. B) All features, such as merged cells and conditional formats, are available and can be changed even once the workbook is shared. C) When a workbook is shared, you can save additional copies of your workbook for distribution to other users. D) Each user has their own settings, or custom view, saved of the workbook that allows you to save print settings and any filters you may have created.

Computer Science & Information Technology

Both and elements must appear immediately after the opening ____ element, or after the element if the table contains a caption.

A.

B. D.
C.

Computer Science & Information Technology