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

A trapezoid has base of 10m and 25m. If it's area is 140m², what is its height? ​
a C 5√3 30° Determine the value of a. a = 5 Determine the value of c. i need help finding the value of C
What is the fractional exponents of (1,024)^2/5 ?
Suppose a convention hall hosts two events at the same time – a tabletop event, and a virtual reality exhibition. Tickets are sold separately for each event, s
how many quarts are in 1/4 gallon
Car insurance incentives and discounts are available depending on
Alma made a mistake as she started to solve this system of equations: y = 1/2 x - 1 4x - 2y = 11 .Use the sketch tool to show the error in Alma’s work.
4 -3/8-2 where a is not equivalent to two
This reaction makes potassium superoxide useful in a self-contained breathing apparatus. How much O2 could be produced from 2.43 g of KO2 and 4.48 g of CO2?
A container with a volume of 5.0 L contains air at a pressure of 2.0 atm. If the volume is reduced to 2.5 L at constant temperature, what will be the resulting