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 189 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
Thanks for the timely response, appreciate it


zacnyjessica

  • Member
  • Posts: 345
Reply 3 on: Yesterday
YES! Correct, THANKS for helping me on my review

 

Did you know?

According to the FDA, adverse drug events harmed or killed approximately 1,200,000 people in the United States in the year 2015.

Did you know?

It is important to read food labels and choose foods with low cholesterol and saturated trans fat. You should limit saturated fat to no higher than 6% of daily calories.

Did you know?

Limit intake of red meat and dairy products made with whole milk. Choose skim milk, low-fat or fat-free dairy products. Limit fried food. Use healthy oils when cooking.

Did you know?

All adults should have their cholesterol levels checked once every 5 years. During 2009–2010, 69.4% of Americans age 20 and older reported having their cholesterol checked within the last five years.

Did you know?

Eat fiber! A diet high in fiber can help lower cholesterol levels by as much as 10%.

For a complete list of videos, visit our video library