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 181 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
:D TYSM


TheNamesImani

  • Member
  • Posts: 334
Reply 3 on: Yesterday
Thanks for the timely response, appreciate it

 

Did you know?

About 100 new prescription or over-the-counter drugs come into the U.S. market every year.

Did you know?

The effects of organophosphate poisoning are referred to by using the abbreviations “SLUD” or “SLUDGE,” It stands for: salivation, lacrimation, urination, defecation, GI upset, and emesis.

Did you know?

Pregnant women usually experience a heightened sense of smell beginning late in the first trimester. Some experts call this the body's way of protecting a pregnant woman from foods that are unsafe for the fetus.

Did you know?

Intradermal injections are somewhat difficult to correctly administer because the skin layers are so thin that it is easy to accidentally punch through to the deeper subcutaneous layer.

Did you know?

Urine turns bright yellow if larger than normal amounts of certain substances are consumed; one of these substances is asparagus.

For a complete list of videos, visit our video library