What is the output of the third println statement in the main method?

```
public class Foo {
int i;
static int s;

public static void main(String[] args) {
Foo f1 = new Foo();
System.out.println("f1.i is " + f1.i + " f1.s is " + f1.s);
Foo f2 = new Foo();
System.out.println("f2.i is " + f2.i + " f2.s is " + f2.s);
Foo f3 = new Foo();
System.out.println("f3.i is " + f3.i + " f3.s is " + f3.s);
}

public Foo() {
i++;
s++;
}
}```
a. f3.i is 1 f3.s is 1
b. f3.i is 1 f3.s is 2
c. f3.i is 1 f3.s is 3
d. f3.i is 3 f3.s is 1
e. f3.i is 3 f3.s is 3


c i is an instance variable and s is static, shared by all objects of the Foo class.

Computer Science & Information Technology

You might also like to view...

Toolbox objects unique to web application objects include Navigation objects for allowing user access.

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

Computer Science & Information Technology

Elijah has a section of text that he needs to insert in a variety of documents. He should select the text and then do which of the following?

a. Create a citation. b. Create a template. c. Create a Quick Part. d. Create a style.

Computer Science & Information Technology

?A MAC address contains ____.

A. ?only digits B. ?only letters C. ?only symbols D. ?digits and letters

Computer Science & Information Technology

When a sequence of facts or steps is described, technical writers try to avoid which of these?

A. Bulleted list B. Numbered list C. Narrative passage D. All of these

Computer Science & Information Technology