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
What type of game is LEAST LIKELY to need a structured narrative?
VladimirAG [237]

Answer:

Probably a sports game

Explanation:

A role-playing means acting it out, so you need to explain the life with a structured narrative.

An adventure game needs lots of background, so you need to fill that in with a structured narrative.

A sports game revolves solely around sports, so you only need to know how to play the game and/or sport, so no structured narrative is needed.

An fps game needs a structured narrative in that it is similar to an adventure game and needs background.

Let me know if I was right! Hope this helped. :)

5 0
3 years ago
((GUITAR))<br> What is the letter name for the note shown above?<br><br> D<br> E<br> F<br> G
iren2701 [21]
It is Letter G
Explanation: Took Guitar classes as a kid and memorized the letters.
3 0
3 years ago
What is the purpose of the SMTP command "HELO"
sergij07 [2.7K]
If a client initiates the SMTP communication using an EHLO (Extended Hello) command instead of the HELO command some additional SMTP commands are often available. They are often referred to as Extended SMTP (ESMTP) commands or SMTP service extensions. Every server can have its own set of extended SMTP commands.
4 0
3 years ago
Keyboarding and typing 100 words per minute can be thought of as a
bija089 [108]
is categorised as typing speed skill
5 0
3 years ago
Write about how this item was important to you.
nlexa [21]
What is important to you
7 0
2 years ago
Other questions:
  • Writers should avoid jargon because jargon ______. a. Takes too long to use b. Limits what ideas can be explored c. Conveys too
    12·1 answer
  • Write an application that inputs a telephone number as a string in the form (555) 555-5555. The application should use String me
    10·1 answer
  • Write a program that uses for loops to perform the following steps: Prompt the user to input two integers: firstNum and secondNu
    15·1 answer
  • Which of these networks is primarily for posting and viewing photos?
    8·2 answers
  • How can i promote netiquette??​
    10·1 answer
  • Write a program that allows two players to play a game of tic-tac-toe. Use a two dimensional char array with three rows and thre
    7·1 answer
  • How many report charts can be added to the account page layout to meet this requirement? A sales manager would like to look at a
    14·1 answer
  • Eliza needs to share contact information with another user, but she wants to include only certain information in the contact. Wh
    9·2 answers
  • What is the term used to describe the basic unit of data passed from one computer to another
    14·1 answer
  • If you use your smartphone as a hotspot to connect to the Internet on your tablet you are using a ________.quillet
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!