0% found this document useful (0 votes)
5 views1 page

Java Array Exercises

The document outlines a series of Java programming exercises focused on arrays and array lists. It includes tasks such as finding common elements, counting even and odd integers, identifying duplicates, and manipulating array lists by adding, updating, searching, and reversing elements. These exercises aim to enhance understanding and skills in handling arrays and array lists in Java.

Uploaded by

Omeer Salarzai
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

Java Array Exercises

The document outlines a series of Java programming exercises focused on arrays and array lists. It includes tasks such as finding common elements, counting even and odd integers, identifying duplicates, and manipulating array lists by adding, updating, searching, and reversing elements. These exercises aim to enhance understanding and skills in handling arrays and array lists in Java.

Uploaded by

Omeer Salarzai
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Java Array exercises:

1- Write a Java program to find common elements between two arrays


(integer value).
2- Write a Java program to find common elements between two arrays (string
values)
3- Write a Java program to find the number of even and odd integers in a
given array of integers.
4- Write a Java program to find duplicate values in an array of integer values.
Java Array-List exercises:
1- Write a Java program to create an array list, add some colors (strings) and
print out the collection.
2- Write a Java program to insert an element into the array list at the first
position.
3- Write a Java program to update an array element by the given element.
4- Write a Java program to search for an element in an array list.
5- Write a Java program to copy one array list into another.
6- Write a Java program to reverse elements in an array list.
7- Write a Java program to compare two array lists.
8- Write a Java program to empty an array list.
9- Write a Java program to replace the second element of an ArrayList with
the specified element

You might also like