C C++ Java Data Structure Python JavaScript CSS Ajax PL/SQL PHP Puzzles C programs C++ programs Java programs

Home » Java programs

Java ArrayList solved examples/programs

This section contains solved programs on Java ArrayList with output and explanations like, adding element in the list, removing element from the list etc.

Java ArrayList programs

  1. Java program to multiply corresponding elements of two lists.
    Here, we are implementing a java program that will multiply corresponding elements of two array lists.
  2. How to extract some of the elements from given list in java?
    Here, we are implementing a java program that will have some elements in the list and we will extract particular elements (from given to index to from index).
  3. Java program to replace element within the ArrayList.
    In this java program, we are going to learn how to replace element of an ArrayList? Here, we have an ArrayList and replace element of it.
  4. Java program to find index of an element from an ArrayList.
    In this Java program, we are going to learn how to find an index of an element from an ArrayList? To find an index of an element using ArrayList.indexOf() method.
  5. Java program to search an element from an ArrayList.
    In this java program, we are going to learn how to search an element from an ArrayList? To find an element, we use contains() method of ArrayList class.
  6. Java program to create a sub list from an ArrayList.
    In this Java program, we are going to learn how to create a sub list from an ArrayList? This example contains a list of some elements and creates a sub list.
  7. Java program to remove all elements from an ArrayList.
    In this Java program, we are going to learn how to remove all elements from an ArrayList? Here, we are using ArrayList.clear() to remove all elements.
  8. Java program to remove elements from specific index from an ArrayList.
    In this program, we a going to learn to create an ArrayList, adding elements to ArrayList and removing elements from specific index.
  9. Java program to add elements in ArrayList and print them in reverse order.
    In this program, we are going to create an ArrayList, add elements in the ArrayList and print elements in reverse order.
  10. Java program to add element at specific index in ArrayList.
    In this program, we are going to learn create an ArrayList, adding elements at specific index and print them on output screen.
  11. Java program to create an ArrayList, add elements and print.
    In this java program, we are going to learn how to create an ArrayList, add elements in the ArrayList and print the elements on the output screen?



COMMENTS