import java.util.*;
public class CommonValue {
public static void main(String args[]) {
int my_arr1[] = { 1, 2, 3, 4, 5, 6, 7, 7, 9, 10 };
int my_arr2[] = { 11, 12, 13, 14, 5, 6, 17, 7, 19, 21, 24, 1 };
for (int i = 0; i < my_arr1.length; i++) {
for (int j = 0; j < my_arr2.length; j++) {
if (my_arr1[i] == my_arr2[j]) {
System.out.println("Common elements are " + my_arr1[i]);
}
}
}
}
}