Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java I need to write a method for the ArrayIntList class that doubles the size of an arraylist by replacing every number in the list
Java
I need to write a method for the ArrayIntList class that doubles the size of an arraylist by replacing every number in the list with two of that number. e.g.
[2, 10, 12, 8, 14] and we call the list it should give
[2, 2, 10, 10, 12, 12, 8, 8, 14, 14]
this is what I did so far but it's wrong. Please help.
public void stretch(){ ArrayList
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started