Answers for "how to add the number from an array list"

1

adding items to an arraylist

import java.util.ArrayList;

public class Main {
  public static void main(String[] args) {
    ArrayList<String> cars = new ArrayList<String>();
    cars.add("Volvo");
    cars.add("BMW");
    cars.add("Ford");
    cars.add("Mazda");
    System.out.println(cars);
  }
}
Posted by: Guest on September-02-2021
1

add list as element in array

numbers = [100,200,250,300]
numbers.append([101,201,251,301])
print len(numbers)
Posted by: Guest on June-27-2021

Code answers related to "how to add the number from an array list"

Python Answers by Framework

Browse Popular Code Answers by Language