Java Array Exercises [23 exercises with solution]
1. Write a Java program to sort an numeric array and a string array. Go to the editor
2. Write a Java program to sum values of an array. Go to the editor
3. Write a Java program to print the following grid. Go to the editor
4. Write a Java program to calculate average value of an array elements. Go to the editor
5. Write a Java program to test if an array contains a certain value. Go to the editor
6. Write a Java program to find the index of an array element. Go to the editor
7. Write a Java program to remove a specific element from an array. Go to the editor
8. Write a Java program to copy an array by iterating the array. Go to the editor
9. Write a Java program to insert an element (specific position) into an array. Go to the editor
10. Write a Java program to find the maximum and minimum value of an array. Go to the editor
11. Write a Java program to reverse an array of integer values. Go to the editor
12. Write a Java program to find the duplicate values of an array of integer values. Go to the editor
13. Write a Java program to find the duplicate values of an array of string values. Go to the editor
14. Write a Java program to find the common elements between two arrays (string values). Go to the editor
15. Write a Java program to find the common elements between two arrays of integers. Go to the editor
16. Write a Java program to remove duplicate elements from an array. Go to the editor
17. Write a Java program to find the second largest element in an array. Go to the editor
18. Write a Java program to find the second smallest element in an array. Go to the editor
19. Write a Java program to add two matrices of same size. Go to the editor
20. Write a Java program to convert an array To ArrayList. Go to the editor
21. Write a Java program to convert an ArrayList to an array. Go to the editor
22. Write a Java program to find all pairs of elements in an array whose sum is equal to a specified number. Go to the editor
23. Write a Java program to test the equality of two arrays. Go to the editor
List of Exercises with Solutions :