Finding duplicates between n Sets
First off, I'm assuming Object isn't java.lang.Object, but your own class. In that case you really should find a better name for it. Even if java.lang.Object didn't exist, "Object" is a terribly generic name giving absolutely no clue on what it represents.



The variable names flag1 and flag2 are beyond terrible, plus I believe you only need one boolean flag, if at all. Reading the algorithm gave me a headache, so I gave up after a while, so I can't say if it does what it should correctly.



Considering the method is working with sets it should return a Set and not a List.



Is the use of variable arguments really a valid usage pattern? That is usually only sensible if you call the method with separate arguments in code. This seems more like a situation where you have a Collection of objects to start with.



d is a bad variable name (again).



You should check if d actually contains at least one object (and return an empty list/set, if not), otherwise the user of the method will get an unhelpful IndexOutOfBoundsException.



In your method you only access the "neighboring objects" property of your Object and no other property. Instead of giving the method a list/array of your Objects, it would make sense to instead just give it a list/array of the sets of neighboring objects.



As @markspace says, the algorithm you are describing seems to simply be the intersection of all sets, which you can get using the method .retainAll() of Set.



Based on this the simplest attempt would be something like this (using Java 8 Streams):

// This first method is only needed if you really need the varargs:
public static Set&lt;Object&gt; getOverlapingNeighbors(Object... objects) {
   return getOverlapingNeighbors(Arrays.asList(d));
}

public static Set&lt;Object&gt; getOverlapingNeighbors(List&lt;Object&gt; objects) {
   return intersectionOf(objects.stream().map(Object::getNeighboringObjects).collect(Collectors.toList()));
}

// These are two generic methods that calculate the intersection of Sets of any (java.utils.)Objects. 
// It could/should be placed in a general utility class. 
public static &lt;T&gt; Set&lt;T&gt; intersectionOf(Collection&lt;Set&lt;T&gt;&gt; sets) {
    // It may be useful to first sort the list of sets by size, to optimize 
    // runtime. 
    // It is not the most optimal implementation, since it creates a new HashSet 
    // in each call of intersectionOf(Set&lt;T&gt; a, Set&lt;T&gt; b)
    return sets.stream().reduce((r, s) -&gt; intersectionOf(r, s)).orElse(Collections.emptySet());
}


public static &lt;T&gt; Set&lt;T&gt; intersectionOf(Set&lt;T&gt; a, Set&lt;T&gt; b) {
    Set&lt;T&gt; newA = new HashSet&lt;&gt;(a);
    newA.retainAll(b);
    return newA;
}