Scala BitSet -(elems: Int*) method with example Last Updated : 04 May, 2020 Comments Improve Suggest changes Like Article Like Report Scala Bitsets are sets of non-negative integers which are represented as variable-size arrays of bits packed into 64-bit words. The -(elems: Int*) method is utilised takes two or more elements to be removed. Method Definition: def +() Return Type: a new collection that contains all elements except one less occurrence of each of the given elements. Example #1: Scala // Scala program of Bitset - // method import scala.collection.immutable.BitSet // Creating object object GfG { // Main method def main(args:Array[String]) { val b2: Set[Int] = BitSet(5, 6, 7, 55, 56, 57) - 55 - 56 // Displays output println(b2) } } Output: BitSet(5, 6, 7, 57) Example #2: Scala // Scala program of Bitset - // method import scala.collection.immutable.BitSet // Creating object object GfG { // Main method def main(args:Array[String]) { val b2: Set[Int] = BitSet(5, 6, 7) - 5 - 6 - 0 // Displays output println(b2) } } Output: BitSet(7) Comment More infoAdvertise with us Next Article Scala BitSet -(elems: Int*) method with example S Shivam_k Follow Improve Article Tags : Python Scala scala Immutable-collection Scala Immutable-BitSet Practice Tags : python Similar Reads Scala BitSet +(elems: Int*) method with example Scala Bitsets are sets of non-negative integers which are represented as variable-size arrays of bits packed into 64-bit words. The +(elems: Int*) method is utilised create a new set with additional elements, omitting duplicates. Method Definition: def +() Return Type: It returns a new set omitting 1 min read Scala BitSet -() method with example Scala Bitsets are sets of non-negative integers which are represented as variable-size arrays of bits packed into 64-bit words. The -() method is utilised to create new set with a given element removed from this set. Method Definition: def -(elem) Return Type: It returns new set that contains all el 1 min read Scala BitSet --() method with example Scala Bitsets are sets of non-negative integers which are represented as variable-size arrays of bits packed into 64-bit words. The --() method is utilised create a new collection from this collection by removing all elements of another collection. Method Definition: def --() Return Type: It returns 1 min read Scala BitSet +() method with example Scala Bitsets are sets of non-negative integers which are represented as variable-size arrays of bits packed into 64-bit words. The +() method is utilised create a new set with an additional element, unless the element is already present. Method Definition: def +() Return Type: It returns a new set 2 min read Scala Int *(x: Byte) method with example The *(x: Byte) method is utilized to return the product of the specified int value and byte value. Method Definition: (Int_Value).*(Byte_Value) Return Type: It returns the product of the specified int value and byte value. Example #1: Scala // Scala program of Int *(x: Byte) // method // Creating ob 1 min read Scala Int *(x: Double) method with example The *(x: Double) method is utilized to return the product of the specified int value and double value. Method Definition: (Int_Value).*(Double_Value) Return Type: It returns the product of the specified int value and double value. Example #1: Scala // Scala program of Int *(x: Double) // method // C 1 min read Scala BitSet apply() method with example Scala Bitsets are sets of non-negative integers which are represented as variable-size arrays of bits packed into 64-bit words. The +() method is utilised to test if some element is contained in this set. Method Definition: def apply() Return Type: true if elem is contained in this set, false otherw 1 min read Scala Char *(x: Int) method with example The *(x: Int) method is utilized to find the product of the stated character value and 'x' of type Int. Method Definition: def *(x: Int): Int Return Type: It returns Int. Example: 1# Scala // Scala program of *(x: Int) // method // Creating object object GfG { // Main method def main(args:Array[Stri 1 min read Scala Int *(x: Char) method with example The *(x: Char) method is utilized to return the product of the specified int value and char value. Here the char value is the ASCII value of the specified char. Method Definition: (Int_Value).*(Char_Value) Return Type: It returns the product of the specified int value and char value. Example #1: Sca 1 min read Scala Char |(x: Int) method with example The |(x: Int) method is utilized to find the bit-wise OR of the stated character value and given "x" in the argument list which must be Integer. Method Definition: def|(x: Int): Int Return Type: It returns the bit-wise OR of the stated character value and given Integer "x". Example: 1# Scala // Scal 1 min read Like