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]
2 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]2 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
Use the modulo operator (%) to get the desired rightmost digits. Ex: The rightmost 2 digits of 572 is gotten by 572 % 100, which
uranmaximum [27]

Hi, you haven't provided the programing language in which you need the code, I'll just explain how to do it using Python, and you can apply a similar method for any programming language.

Answer:

def rightMost(num):

   lenNum = len(str(num))

   rightNum = num%(10**(lenNum-1))

   print(rightNum)

   return(rightNum)

Explanation:

In this function we receive an integer number, then we find how many digits this number has, and finally, we find the rightmost digits; the main operation is modulo (takes the remainder after a division), what we want is to take all the digits except the first one, for that reason we find the modulo of the number when divided by ten to the power of the length of the number minus one, for example, if the number is 2734 we divided by 10^(4-1), where four is the length of the number, this way we get 2734/1000 and the module of it is 734.

5 0
3 years ago
You cannot then move and resize the control on the form as desired with your mouse TRUE OR FALSE​
Sindrei [870]

Answer:

False

Explanation:

4 0
2 years ago
Read 2 more answers
Some of y'all make me lose braincells with your questions
boyakko [2]

Answer:

ok done we will try

BTW have a nice day enjoy your day Stay blessed stay happy stay strong

5 0
2 years ago
Read 2 more answers
Which one of the following is true about employer responsibility in providing fall protection to workers? not selected A. Employ
Luda [366]

Option B is the correct answer, Employers have flexibility in choosing a fall protection system they believe will work best in a situation selected. It is the primary duty of employer to provide safety to its workers. Employers must setup a suitable protection system at workplace from falling off from overhead platforms and from elevated workstations during construction for safety of its employees.  

Further Explanation:

⦁ Employer must ensure compliance to OSHA-Fall protection in construction.

⦁ Generally, fall protection must be ensured by deploying guardrail systems at the edge of construction sites, safety systems built by nets or personal fall arrest.

⦁ OSHA requires to built fall protection system irrespective of fall distance to make sure safety conditions for workers/ employees.

Answer details:

Grade: High School

Subject: Computer Science and Technology.

Learn More:

Fall protection and compliance to OSHA rules and regulations

brainly.com/question/8910167

Employer responsibility in providing fall protection

brainly.com/question/5872956

Key Words: Fall protection, OSHA, workplace safety, guardrail systems etc.

Image of guardrail as an example is attached.

5 0
3 years ago
Read 2 more answers
Anyone know a way to trade in a Xbox with a Ps4?
wlad13 [49]
I’m not sure sorry dude
5 0
2 years ago
Read 2 more answers
Other questions:
  • Write a converter program for temperatures. This program should prompt the user for a temperature in Celsius. It should then con
    10·1 answer
  • What exactly is a byte? A byte is a term that is short for binary digit. 8 bytes hold about one letter, one number, or one speci
    10·1 answer
  • which student organization helps students with career development by having them become interms to sponsor conferences?
    9·1 answer
  • What can act as a buffer against unemployment
    11·1 answer
  • Your source data is of 50 GB. You make a full backup. Next week, once again you perform a full backup, but this time 10 more GB
    10·1 answer
  • What is the mest gun in pixel gun 3d imma give you brainliest
    14·2 answers
  • A student registers for a course in a university. Courses may have limited enrollment i.e a student must
    5·1 answer
  • What does running the “sudo” command do?
    6·1 answer
  • Most presentation programs allow you to save presentations so they can be viewed online by saving them as ____
    5·2 answers
  • Is it good to work out at the gym one day with hands then the next with feet, then a pattern?
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!