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

Home » Java programs

Java Array solved programs/Examples with Output, Explanation

This section contains solved programs on one dimensional, two and multi dimensional array in Java with output and expiation.

Java Array programs

  1. Java program to read and print a two dimensional array.
    In this java program, we are going to learn how to read and print a two dimensional array? Here, we are reading number of rows and columns and reading, printing the array elements according to the given inputs.
  2. Java program to sort a one dimensional array in ascending order.
    Here, we are implementing a java program to sort an array (one-dimensional array) in ascending order? We are reading array elements, arranging them in ascending order and printing the sorted array.
  3. Java program to merge two one dimensional arrays.
    In this java program, we are going to learn how to merge two one dimensional arrays? Here, we are reading two one dimensional arrays and merging their elements.
  4. Java program to print EVEN and ODD elements from an array.
    In this java program, we are going to learn how to find and print separately EVEN and ODD number from an array?
  5. Java program to delete a specific element from a one dimensional array.
    In this java program, we are going to learn how to delete an element from a one dimensional array? Here, we have an array and then deleting a given element from array.
  6. Java program to move all zero at the end of the array.
    In this java program, we are implementing a logic in which all zeros (0) of given array will be moved at the end of the array.
  7. Java program to find differences between minimum and maximum numbers in an array.
    In this java program, we are going to learn how to find the smallest (minimum), largest (maximum) numbers from an array and also find their difference?
  8. Java program to find average of all array elements.
    In this java program, we are going to read N integer elements and finding their average.
  9. Java program to find missing elements in array elements.
    In this java program, we are going to learn how to find missing element from array elements? Here, we have an array and finding an element which is missing in the list.
  10. Java program to find the common strings in two string arrays.
    In this java program, we are going to find and print the common strings from two string arrays, here we have two string arrays and printing their common strings, which exist in both of the arrays.
  11. Java program to find the common elements in two integer arrays.
    In this java program, we are going to find and print the common elements from two integer arrays; here we have two integer arrays and printing their common elements, which exist in both of the arrays.
  12. Java program to check sparse matrix.
    In this java program, we are going to read a matrix and check whether it is sparse matrix or not?
  13. Java program to subtract two matrices (subtraction of two matrices).
    In this java program, we are going to read two matrices and finding their multiplication in third matrix and printing the resultant matrix.
  14. Java program to multiply two matrices.
    In this java program, we are going to learn how to find multiplication of two matrices? Here, we are taking input of two matrices and printing their multiplication.
  15. Java program to sort an array in descending order.
    In this java program, we are going to learn how to read an integer array and sort array in descending order?
  16. Java program to sort an array in ascending order.
    In this java program, we are going to learn how to read an integer array and sort array in ascending order?
  17. Java program to find sum of array elements.
    In this java program, we are going to learn how to read an array and find sum of all array elements?



COMMENTS