// Scala program of Check specific elements in HashSet import scala.collection.immutable.HashSet // Creating object object GFG { // Main method def main(args : Array[String]) { println( "Initialize a HashSet" )
// Java implementation of the approachimportjava.util.*;classGFG{// Generic function to check whether the given array// has all identical element or notpublicstatic<T>voidcheckIdentical(Tarray[]){// Create the Set by passing the Array// as parameter in the constr...