public class Main {
public static void main(String[] args) {
int[] arr1 = {1,2,3,3,4};
for (int i = 0; i < arr1.length-1 ; i++) {
for (int j = 0; j < arr1.length; j++) {
if (arr1[i]==arr1[j] && (j != i)){
System.out.println("array's duplicate number: " +
arr1[j]);
}
}
}
}
}