Question: What will the following program print when compiled and run? Select the one correct answer. (a) false|true|false|true (b) true|true|true|true (c) false|true|true|true (d) true|true|false|true (e) None

What will the following program print when compiled and run?

public class RQ200A70 { public static void main(String[] args) { Integer i

Select the one correct answer.

(a) false|true|false|true

(b) true|true|true|true

(c) false|true|true|true

(d) true|true|false|true

(e) None of the above.

public class RQ200A70 { public static void main(String[] args) { Integer i = new Integer (-10); Integer j = new Integer (-10); Integer k= -10; System.out.print((i==j) + ""); System.out.print (i.equals(j) + ""); System.out.print((i==k) + "|"); System.out.print(i.equals (k));

Step by Step Solution

3.49 Rating (149 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a Using the new operator ... 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!