kyliepugh7732 kyliepugh7732
  • 21-01-2020
  • Computers and Technology
contestada

Assume v is a vector of integers that has been declared and initialized. Write a statement that adds the value 42 to the vector.

Respuesta :

flightbath flightbath
  • 22-01-2020

Answer:

v.add(42);

Explanation:

A vector is an inbuilt class in Java, which extends AbstractList class of Java. It is a kind of dynamically allocated arrays which does not need size at the time of declaration. It can expand as much as it can. AbstractList class implements the List interface of Java which has some generic functions like add(), sort(), etc.

Answer Link

Otras preguntas

¿Qué hacías tú cuando tenías seis años? Write a letter in Spanish to a friend describing what you used to do when you were six years old. Write about what you u
Help me for a Through f
Which of the following statements best describes the appropriate adjustments you can make to your workout based on your working heart rate? A) If your heart rat
List seven perks members of congress receive.
la fuerza de voluntad surge de modo natural o requiere esfuerzo
The information you bring into an open book test should be organized for fastest possible retrieval. True or false ?
H3LP what is the name of the scientist who first proposed that atoms have a nucleus? A. Niels Bohr B. John Dalton C. Eugen Goldstein D. Ernest Rutherford
The president has the power to grant pardons. True False
What is gold? A. an alloy B. a molecule C. a compound D. an element
The Cubs have won 44 baseball games and have lost 65 games. They have 53 games remaining. At least how many of the remaining 53 games must the Cubs win to have