1. (1) Java Program toFind duplicates and unique set Example Input : an array of String contains :String[] str = new String[] {"alok", "dhoni", "manish",…