Question: What will be the output when running the following program? Select the two correct answers. (a) The first number printed will be 9. (b) The

What will be the output when running the following program?

public class StillMyClass { public static void main (String [] args) {

Select the two correct answers.

(a) The first number printed will be 9.

(b) The first number printed will be 10.

(c) The first number printed will be 11.

(d) The second number printed will be 9.

(e) The second number printed will be 10.

(f) The second number printed will be 11.

public class StillMyClass { public static void main (String [] args) { int i = 0; } } int j; for (j = 0; j < 10; ++j) { i++; } System.out.println (i + +j);

Step by Step Solution

3.45 Rating (168 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

b and e Both the first and second numbers printed will be 10 Both t... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java Programming 8th Questions!