Question: Which statements are true about the output from the following program? Select the two correct answers. (a) The first digit printed is 1. (b) The

Which statements are true about the output from the following program?

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

Select the two correct answers.

(a) The first digit printed is 1.

(b) The first digit printed is 2.

(c) The first digit printed is 3.

(d) The second digit printed is 1.

(e) The second digit printed is 2.

(f) The second digit printed is 3.

public class Logic { public static void main(String [] args) { int i = 0; int j = 0; } } boolean t= true; boolean r; r = (t & 0 < (i+= 1)); r = (t | (t && 0 < (i+=2)); 0 < (j+= 1)); r = (t || 0 < (j+=2)); System.out.println (i + + j);

Step by Step Solution

3.36 Rating (149 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

c and d Note that the logical and conditional operators h... 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!