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
Ket [755]
3 years ago
10

Write a method named removeRange that accepts an ArrayList of integers and two integer values min and max as parameters and remo

ves all elements values in the range min through max (inclusive). For example, if an ArrayList named list stores [7, 9, 4, 2, 7, 7, 5, 3, 5, 1, 7, 8, 6, 7], the call of removeRange(list, 5, 7); should change the list to store [9, 4, 2, 3, 1, 8
Computers and Technology
1 answer:
telo118 [61]3 years ago
5 0

Answer:

Answered below

Explanation:

public ArrayList<Integer> removeRange(ArrayList<Integer> X, int min, int max){

int i; int j;

//Variable to hold new list without elements in //given range.

ArrayList<Integer> newList = new ArrayList<Integer>();

//Nested loops to compare list elements to //range elements.

if(max >= min){

for( i = 0; i < x.length; I++){

for(j = min; j <= max; j++){

if( x [i] != j){

newList.add( x[i] );

}

}

}

return newList;

}

}

You might be interested in
13. You're emailing your grandparents. Which of the following is the best example of digital etiquette?
lorasvet [3.4K]
D. spelling out words and avoiding slang
6 0
2 years ago
Read 2 more answers
I WILL MARK BRAINLEST
mezya [45]

Answer: I think its the last one, there is often more than one right choice :)

5 0
3 years ago
You copy several files from one folder to another folder within the same drive. what permissions do the files in the destination
cricket20 [7]
They have the same permissions in the destination folder as in the original folder
3 0
3 years ago
What may happen if a large number of computer users are attempting to access a Web site at the same time that you are?
TEA [102]
D because at the same time it might be long


4 0
3 years ago
Read 2 more answers
Which of the following is a definition of a conventions
laiz [17]
Need more information
6 0
4 years ago
Read 2 more answers
Other questions:
  • g Write a program that prompts the user to enter two integers. The program outputs how many numbers are multiples of 3 and how m
    11·1 answer
  • What is the color of red?
    9·2 answers
  • Which statement about bump mapping and normal mapping is true?
    9·1 answer
  • Jerry can use an <br> program to restrict information from going out without his permission.
    12·2 answers
  • Which fraction represents the shaded part of this circle? 1 2 O 4 Check Answer /3rd grade/​
    14·2 answers
  • Cómo mi dificar el aspecto del texto​
    12·2 answers
  • Design and implement an application that reads a set of values in the range 1 to 100 from the user and then creates a chart show
    8·1 answer
  • What type of movement does the output produce
    10·1 answer
  • В.
    11·1 answer
  • Explain input device​
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!