for (Set<Integer> s : SetUtils.powerSet(mySet))
I tried running the above code, but SetUtils variable was not found. I am using Java 1.8.
What should I import to run the above statement?
for (Set<Integer> s : SetUtils.powerSet(mySet))
I tried running the above code, but SetUtils variable was not found. I am using Java 1.8.
What should I import to run the above statement?
You should import org.apache.commons.collections4.SetUtils
.
If your IDE didn't handled adding the library see this How do I learn to use Java commons-collections? to learn how to use that in your project.
You can find required jar
files from apache site.