What is the output of the following code:

```
public class Test {
public static void main(String[] args) {
Object o1 = new Object();
Object o2 = new Object();
System.out.print((o1 == o2) + " " + (o1.equals(o2)));
}
}```
a. false false
b. true true
c. false true
d. true false

a o1 == o2 is false, since o1 and o2 are two different objects. o1.equals(o2) is false since the equals method returns o1 == o2 in the Object class.

Computer Science & Information Technology

You might also like to view...

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

1. In logical data flow diagrams, the type of physical storage is unspecified. 2. The systems analyst needs to conceptualize data flows from a top-down perspective. 3. The highest level data flow diagram is called Diagram 0. 4. With a top-down approach, the diagrams move from specific to general.

Computer Science & Information Technology

Explain the following three types of pointers: physical address pointer, relative address pointer, and logical key pointer.

What will be an ideal response?

Computer Science & Information Technology