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
Wich type of operating system is usually used in personal computers
Anvisha [2.4K]
The three most common operating systems for personal computers are Microsoft Windows, Apple Mac OS X, and Linux.
4 0
3 years ago
Read 2 more answers
Everfi module 7 answers
Nat2105 [25]
What is the question?
7 0
3 years ago
A coffee shop is considering accepting orders and payments through their phone app and have decided to use public key encryption
Charra [1.4K]

Answer: Yes

Explanation:

Public key encryption is the encryption technique that is used for private keys and public keys for securing the system.Public key is used for encryption and private key is for decryption.Public keys can only open content of the system

  • According to the question, public key encryption is secure for coffee shop customer payment process as they are stored on digital certificates in long form for verifying digital signature and encrypting information.Its computation is difficult to crack through power computer access.  
  • Other options is incorrect as encryption is not a problem for payment procedures. Thus, the correct option is yes ,public key encryption is secure method for coffee shop customers .
8 0
3 years ago
Given an array a, declared to contain 34 elements, write an expression that refers to the last element of the array.
Mice21 [21]
If the language is zero indexed:

a[ 33 ]
4 0
3 years ago
Who wants to be my tutor?
anzhelika [568]

Answer:

i would but im not big brain

Explanation:

8 0
3 years ago
Read 2 more answers
Other questions:
  • Disk scheduling algorithms in operating systems consider only seek distances, because Select one: a. modern disks do not disclos
    13·1 answer
  • Following a company on likedin is most similar to
    8·1 answer
  • A _____ is a device that not only provides surge protection, but also furnishes desktop computers and network devices with batte
    7·1 answer
  • The use of electronic media, information, and communication technologies to deliver instruction where students are not required
    8·1 answer
  • What kind of a bug is 404 page not found
    10·2 answers
  • java Two smallest numbers Write a program that reads a list of integers, and outputs the two smallest integers in the list, in a
    6·1 answer
  • Your friend has a great idea for a new app, and she shows you a document that outlines what the app will do. This document is an
    6·1 answer
  • Answer the questions about PowerPoint using the drop-down menus,
    15·2 answers
  • Aspire is a test you take to prepare for the<br> A. PSAT<br> B. SAT<br> C. ACT<br> D. FAFSA
    11·1 answer
  • Please answer the following question in Verilog.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!