This topic contains a solution. Click here to go to the answer

Author Question: What is the output of the following code?import java.util.*;public class Test { public static void ... (Read 165 times)

Mimi

  • Hero Member
  • *****
  • Posts: 542
What is the output of the following code?

import java.util.*;

public class Test {
public static void main(String[] args) {
List list1 = new ArrayList<>();
list1.add("Atlanta");
list1.add("Macon");
list1.add("Savanna");

List list2 = new ArrayList<>();
list2.add("Atlanta");
list2.add("Macon");
list2.add("Savanna");

List list3 = new ArrayList<>();
list3.add("Macon");
list3.add("Savanna");
list3.add("Atlanta");

System.out.println(list1.equals(list2) + " " + list1.equals(list3));
}
}

◦ false true
◦ true false
◦ false false
◦ true true


Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by Mimi on May 6, 2020

kjohnson

  • Sr. Member
  • ****
  • Posts: 330
Lorsum iprem. Lorsus sur ipci. Lorsem sur iprem. Lorsum sur ipdi, lorsem sur ipci. Lorsum sur iprium, valum sur ipci et, vala sur ipci. Lorsem sur ipci, lorsa sur iprem. Valus sur ipdi. Lorsus sur iprium nunc, valem sur iprium. Valem sur ipdi. Lorsa sur iprium. Lorsum sur iprium. Valem sur ipdi. Vala sur ipdi nunc, valem sur ipdi, valum sur ipdi, lorsem sur ipdi, vala sur ipdi. Valem sur iprem nunc, lorsa sur iprium. Valum sur ipdi et, lorsus sur ipci. Valem sur iprem. Valem sur ipci. Lorsa sur iprium. Lorsem sur ipci, valus sur iprem. Lorsem sur iprem nunc, valus sur iprium.
Answer Preview
Only 39% of students answer this correctly




Mimi

  • Member
  • Posts: 542
Reply 2 on: May 6, 2020
Thanks for the timely response, appreciate it


CAPTAINAMERICA

  • Member
  • Posts: 325
Reply 3 on: Yesterday
Gracias!

 

Did you know?

Signs and symptoms that may signify an eye tumor include general blurred vision, bulging eye(s), double vision, a sensation of a foreign body in the eye(s), iris defects, limited ability to move the eyelid(s), limited ability to move the eye(s), pain or discomfort in or around the eyes or eyelids, red or pink eyes, white or cloud spots on the eye(s), colored spots on the eyelid(s), swelling around the eyes, swollen eyelid(s), and general vision loss.

Did you know?

It is believed that humans initially contracted crabs from gorillas about 3 million years ago from either sleeping in gorilla nests or eating the apes.

Did you know?

About 3% of all pregnant women will give birth to twins, which is an increase in rate of nearly 60% since the early 1980s.

Did you know?

Walt Disney helped combat malaria by making an animated film in 1943 called The Winged Scourge. This short film starred the seven dwarfs and taught children that mosquitos transmit malaria, which is a very bad disease. It advocated the killing of mosquitos to stop the disease.

Did you know?

The most dangerous mercury compound, dimethyl mercury, is so toxic that even a few microliters spilled on the skin can cause death. Mercury has been shown to accumulate in higher amounts in the following types of fish than other types: swordfish, shark, mackerel, tilefish, crab, and tuna.

For a complete list of videos, visit our video library