1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
nalin [4]
3 years ago
12

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)));
Computers and Technology
1 answer:
harina [27]3 years ago
8 0

Answer:

true true

Explanation:

The code snippet first declare an arraylist called list. Then, a date object d is created. The object d is added to the arraylist twice.

Then inside the display statement, there are two boolean expressions. They both check if the element in index 0 and index 1 of the arraylist are the same and if they refer to the same object location in the memory.

The object in index 0 and index 1 are the same and they refer to the same object location in the memory hence the output is true true.

You might be interested in
Janice has a "jammed" key on her keyboard. Every time she strikes the "S" key it sticks and doesn't pop back. What should Janice
Alekssandra [29.7K]

Answer:

I think its A canned air

Explanation:

because i was in computer last year and finished with a 97 i hope this helps

3 0
4 years ago
Read 2 more answers
You are installing an updated driver for a hardware device on your system. A dialog box displays indicating that Microsoft has d
inessss [21]

Answer:

It means the driver has been tested by Microsoft, and its an unaltered file.

Explanation:

A signed driver ensures that comes directly from Microsoft, it hasn't been modified by any other group or otherwise would lose the signature,  the driver is associated with a digital certificate that allows Windows to test its authenticity.

Since drivers work at very high-security levels on Windows OS, installing unsigned drivers it's a considerable risk.

7 0
3 years ago
49 points!
Kaylis [27]

Explanation:

Roberto is a visual designer in a big publication house. For a project, he designs a flyer with several geometric shapes signifying the ...

7 0
3 years ago
What is a computer briage coures​
Stella [2.4K]

what's your choices for this question

4 0
3 years ago
Which type of data storage allows computers to read and write to the memory while the computer is powered on?
klasskru [66]

Answer:

RAM

Explanation:

RAM is Random Access Memory, which means you can access whenever as long as it is powered on.

8 0
3 years ago
Other questions:
  • Which is NOT a way the network operating sys-
    6·1 answer
  • Which set of steps will organize the data to only show foods with more than 100 calories and rank their sugar content from great
    8·1 answer
  • Business conducted using the internet
    9·1 answer
  • Availability is an essential part of ________ security, and user behavior analysis and application analysis provide the data nee
    14·1 answer
  • Which of the following are screen objects used to maintain, view, and print data from a database
    9·1 answer
  • 1. Some of the music in the 1960s was used to protest social and political issues. Is music still used as a form of protest? Why
    13·1 answer
  • Which of the following is not one of the Generally Accepted Recordkeeping Principles ("The Principles®")? a. Accountability b. S
    11·1 answer
  • As your textbook explains, Wikipedia is usually the only source you need when
    8·1 answer
  • Bruh my sister does bot understand what this means
    6·1 answer
  • B. Directions: Fill in the blanks with the correct answer.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!