What is the output for the second statement in the main method?
```
public class Foo {
static int i = 0;
static int j = 0;
public static void main(String[] args) {
int i = 2;
int k = 3;
{
int j = 3;
System.out.println("i + j is " + i + j);
}
k = i + j;
System.out.println("k is " + k);
System.out.println("j is " + j);
}
}
```
a. k is 0
b. k is 1
c. k is 2
d. k is 3
c. k is 2
When computing k = i + j, i is 2 and j is 0.
You might also like to view...
MC Raising an exception is also referred to as__________ an exception.
a) throwing. b) catching. c) tossing. d) pitching.
When a function call occurs, argument values and other items are placed on a(n) __________.
Fill in the blank(s) with the appropriate word(s).
When you export a folder, Outlook adds the extension .fld to the exported file.
Answer the following statement true (T) or false (F)
________ a slide thumbnail to rearrange its position in Slide Sorter view
Fill in the blank(s) with correct word