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 163 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


adf223

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

 

Did you know?

An identified risk factor for osteoporosis is the intake of excessive amounts of vitamin A. Dietary intake of approximately double the recommended daily amount of vitamin A, by women, has been shown to reduce bone mineral density and increase the chances for hip fractures compared with women who consumed the recommended daily amount (or less) of vitamin A.

Did you know?

The human body produces and destroys 15 million blood cells every second.

Did you know?

You should not take more than 1,000 mg of vitamin E per day. Doses above this amount increase the risk of bleeding problems that can lead to a stroke.

Did you know?

In most cases, kidneys can recover from almost complete loss of function, such as in acute kidney (renal) failure.

Did you know?

A strange skin disease referred to as Morgellons has occurred in the southern United States and in California. Symptoms include slowly healing sores, joint pain, persistent fatigue, and a sensation of things crawling through the skin. Another symptom is strange-looking, threadlike extrusions coming out of the skin.

For a complete list of videos, visit our video library