Given two integer arrays and we have to find common integers (elements) using java program.
Example:
Input:
Array 1 elements: 1993, 1995, 2000, 2006, 2017, 2020
Array 2 elements: 1990, 1993, 1995, 2010, 2016, 2017
Output:
Common elements: 1993, 1995, 2017
Program to find common elements in two array elements in java
Output
Array1 : [1993, 1995, 2000, 2006, 2017, 2020] Array2 : [1990, 1993, 1995, 2010, 2016, 2017] Common element is : 1993 Common element is : 1995 Common element is : 2017
need an explanation for this answer? contact us directly to get an explanation for this answer