What is the output of the following Java code?int x = 57;int y = 3;switch (x % 9){case 0:case 1:     y++;case 2:    y = y - 2;    break;case 3:     y = y + 2;case 4:     break;case 5:case 6:     y = y + 3;}System.out.println(y);
     

A. 2
B. 5
C. 6
D. 57


Answer: B

Computer Science & Information Technology

You might also like to view...

Answer the following questions true (T) or false (F)

1. In a static method, you may use the this parameter either explicitly or implicitly. 2. A main method can be placed inside a class definition.

Computer Science & Information Technology

Large pages need to be stored contiguously in main memory. There are several ways to do this: a system can designate a portion of main memory exclusively for large pages, a systemcan rearrange pages in main memory whenever a process requests a large page, or a system can do nothing and deny large-page memory allocation requests whenever necessary.Discuss the pros and cons of each of these three

policies. Suppose an enterprising programmer modifies theWindows XP virtual memory manager so that it allocates space for all page table entries that a process may need as soon as the process is created.Assume that page table entries cannot be moved to secondary storage and that no page table entries are shared What will be an ideal response?

Computer Science & Information Technology

Share permissions can be assigned to ____________

a. Individual users only b. Groups only c. Both users and groups d. None of the above.

Computer Science & Information Technology

____ is the third step in the computer machine cycle.?

A. ?Fetch B. ?Decode C. ?Execute D. ?Store

Computer Science & Information Technology