subject
Computers and Technology, 08.10.2019 02:20 Meiyuh1

What is the output of the second 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. f2.i is 1 f2.s is 1
b. f2.i is 1 f2.s is 2
c. f2.i is 2 f2.s is 2
d. f2.i is 2 f2.s is 1

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:00
What is one way in which tablets differ from laptops and notebooks? tablets are designed for touch-based interaction. tablets are designed to be used as desktops. tablets are designed for input via a keyboard and mouse. tablets are designed to be larger than laptops.
Answers: 1
question
Computers and Technology, 23.06.2019 00:30
If joey was single and his taxable income was $9,500, how much would he pay in taxes each year?
Answers: 1
question
Computers and Technology, 23.06.2019 19:00
Choose the correct citation for the case which established the "minimum contacts" test for a court's jurisdiction in a case. select one: a. brown v. board of education of topeka, 347 u.s. 483 (1954). b. international shoe co. v. washington, 326 u.s. 310 (1945) c. haynes v. gore, 531 u.s. 98 (2000). d. international shoe co. v. washington, 14 u.s. code 336.
Answers: 1
question
Computers and Technology, 23.06.2019 19:00
Whose task it is to ensure that the product flows logically from one step to another?
Answers: 3
You know the right answer?
What is the output of the second println statement in the main method?
public class foo {
Questions
question
History, 29.06.2019 11:00
question
World Languages, 29.06.2019 11:00
Questions on the website: 13722363