Because arrays are not re-sizable, what you can do is make an array that has a size equal to the size of the smallest of the two other arrays.
Keep an index for that array and add common elements as you loop through both arrays.
When you are done, create a new array with a size equal to the index you've reached and copy them over.
But, honestly, use java.util.*
or some other library like Guava
.