What is the output of the following code?

```
ArrayList list = new ArrayList();
java.util.Date d = new java.util.Date();
list.add(d);
list.add(d);
System.out.println((list.get(0) == list.get(1)) + " " + (list.get(0)).equals(list.get(1)));
```
a. true false
b. false true
c. true true
d. false false


c list.get(0) and list.get(1) point to the same object.

Computer Science & Information Technology

You might also like to view...

When a date format is chose that makes the entry too long to display in a cell, the cell fills with # signs

Indicate whether the statement is true or false

Computer Science & Information Technology

Wireless networks can be considered a disruptive technology because they have a profound impact on society.

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

Computer Science & Information Technology

No output was shown. Is that expected?

Redirect Outputs. a. Use the cd command to change to the /home/analyst/ (~) directory:

[analyst@secOps /]$ cd /home/analyst/
[analyst@secOps ~]$
b. Use the echo command to echo a message. Because no output was defined, echo will output to the current terminal window:
analyst@secOps ~]$ echo This is a message echoed to the terminal by echo.
This is a message echoed to the terminal by echo.
c. Use the > operator to redirect the output of echo to a text file instead of to the screen:
analyst@secOps ~]$ echo This is a message echoed to the terminal by echo. >
some_text_file.txt

Computer Science & Information Technology

For an even higher level of security than a scheduled backup, presence backup can be used. _________________________

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

Computer Science & Information Technology