Returns a new bit set containing all the bits in the given long array.
Program
package com.candidjava;
import java.util.BitSet;
/**
* @author : vinod kumar v
* @description :Returns a new bit set containing all the bits in the given long
* array.
**/
public class BitSetStaticValueOfLongLongs {
public static void main(String[] args) throws Exception {
byte b = Integer.valueOf("00010110", 2).byteValue();
BitSet bs = BitSet.valueOf(new byte[] { b });
System.out.println("toString : " + bs.toString());
}
}
Output
toString : {1, 2, 4}
Explanation
public static BitSet valueOf(long[] longs)
Returns a new bit set containing all the bits in the given long array.