1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
e-lub [12.9K]
3 years ago
8

Suppose arraylist list1 is [1, 2, 5] and arraylist list2 is [2, 3, 6]. after list1.addall(list2), list1 is __________.

Computers and Technology
1 answer:
Lady_Fox [76]3 years ago
4 0
The addAll(Collection c) method, simply appends c's elements to the end of the collection that the method was called from.

for example:


List<int> list1 =  new ArrayList<>(Arrays.asList(1, 2, 5));
List<int> list2 =  new ArrayList<>(Arrays.asList(2, 3, 6));
list1.addAll(list2);

for (int num : list1) {
    System.out.print(num + " ");
}


The output of the above code-snippet is: 1 2 5 2 3 6
You might be interested in
Explain 3 categories of plagiarism​
hammer [34]

Answer:

Direct plagiarism- the word-for-word transcription of a section of someone else’s work, without attribution and without quotation marks

Self-plagiarism- when a student submits his or her own previous work, or mixes parts of previous works, without permission from all professors involved

Mosaic Plagiarism- when a student borrows phrases from a source without using quotation marks, or finds synonyms for the author’s language while keeping to the same general structure and meaning of the original

8 0
2 years ago
Read 2 more answers
I get brainlist to whoever can help my computer is doing this and I have class and it’s not working and I got it wet yesterday b
liq [111]

Answer:

try putting a lot of rice on the screen.

Explanation:

if it got water in it that should help it.

3 0
2 years ago
Read 2 more answers
What is an example of a device that commonly use Linux today
slava [35]

Answer:

include iPods, PlayStations, Xbox, TiVo, and WRT54G.

Explanation:

3 0
2 years ago
Read 2 more answers
Unscramble thr words <br>1.Nsieg Wiev<br>2.Seeathdat ievw​
valentinak56 [21]

Answer: genis view       headset view

Explanation:

6 0
2 years ago
Read 2 more answers
Why do we install doorbells in our house
Vinil7 [7]

Explanation:

It's placed near the door. When a visitor presses the button, the bell rings inside alerting you that someone is at the door.

6 0
2 years ago
Read 2 more answers
Other questions:
  • Which of the following situations would not require knowledge of networking?
    6·1 answer
  • By applying styles formats are being applied ?
    14·2 answers
  • A _____ is a link on a web page that leads to another web page.
    13·1 answer
  • Find the largest and smallest byte,short,int,long,float, and double. Which of these data types requires the least amount of memo
    5·1 answer
  • Given an int variable k, an int array incompletes that has been declared and initialized, an int variable studentID that has bee
    10·1 answer
  • True or false? Compared to verbal language a shot is like a word
    12·1 answer
  • Each AWS region is composed of two or more locations that offer organizations the ability to operate production systems that are
    7·1 answer
  • Programmers should strive to _____. increase coupling increase cohesion both of the above neither a nor b
    7·1 answer
  • A new attack involves hacking into medical records and then offering these records for sale on the black market. A medical recor
    14·1 answer
  • In 1868 the qwerty keyboard was patented by this man
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!