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.*;import java.util.*;public class Test { ... (Read 133 times)

sc00by25

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

import java.util.*;

import java.util.*;

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

Set set2 = new HashSet<>();
set2.add("Atlanta");
set2.add("Macon");
set2.add("Savanna");

Set set3 = new HashSet<>();
set3.add("Macon");
set3.add("Savanna");
set3.add("Atlanta");

System.out.println(set1.equals(set2) + " " + set1.equals(set3));
}
}

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


Related Topics

Need homework help now?

Ask unlimited questions for free

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

nyrave

  • Sr. Member
  • ****
  • Posts: 344
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




sc00by25

  • Member
  • Posts: 596
Reply 2 on: May 6, 2020
Gracias!


TheDev123

  • Member
  • Posts: 332
Reply 3 on: Yesterday
:D TYSM

 

Did you know?

A headache when you wake up in the morning is indicative of sinusitis. Other symptoms of sinusitis can include fever, weakness, tiredness, a cough that may be more severe at night, and a runny nose or nasal congestion.

Did you know?

Never take aspirin without food because it is likely to irritate your stomach. Never give aspirin to children under age 12. Overdoses of aspirin have the potential to cause deafness.

Did you know?

Amphetamine poisoning can cause intravascular coagulation, circulatory collapse, rhabdomyolysis, ischemic colitis, acute psychosis, hyperthermia, respiratory distress syndrome, and pericarditis.

Did you know?

Blood is approximately twice as thick as water because of the cells and other components found in it.

Did you know?

In ancient Rome, many of the richer people in the population had lead-induced gout. The reason for this is unclear. Lead poisoning has also been linked to madness.

For a complete list of videos, visit our video library