When you do
actors.get(z).getName() == movieActors.get(n).getName()
I suppose name is a string, in that case it will not be true for same names. You need to do
actors.get(z).getName().equals(movieActors.get(n).getName())
Refer this - How do I compare strings in Java?