Check if the array contains duplicate values
Wasted memory

There is nothing in the description and the posted code to justify storing the input array and duplicates inside a class. This is a waste of memory. 

If you just want to check if an array has duplicate values,
you should do just that. This means you could return early as soon as you found the answer:

public boolean hasDuplicate(int[] items) {
  Set&lt;Integer&gt; appeared = new HashSet&lt;&gt;();
  for (int item : items) {
    if (!appeared.add(item)) {
      return true;
    }
  }
  return false;
}


It's worth noting that fully reading the items array is also a wasted memory. You might even get a follow-up question "what if there are more numbers to check than fit in memory?". Instead of fully reading this array, consider streaming options, for example passing a Scanner, or Iterator&lt;Integer&gt; to hasDuplicate, which will read one number at a time, avoiding unnecessary I/O and memory usage. Just don't forget to close the input resource in the caller method after the computation is finished.

Idiomatic expressions

This is both tedious and not idiomatic:


return duplicates.size() &gt; 0 ? true : false;



Use boolean expressions directly, and use the isEmpty method of collections (and strings) to check for emptiness:

return !duplicates.isEmpty();


A word about testing


  Note: I cannot use JUnit or any testing framework during the interview.


You cannot run a main method with tests either.
You can write down proper unit tests during an interview just as you can write the main method you did with tests.