Question

Here, I see that Bag class should be in java.util.Collection but when I try to use it, I get cannot be resolved to a type error.

Should I copy+pase this or is there some library missing?

Was it helpful?

Solution

Those are 2 different classes neither of which are part of the JDK. One is a custom class that needs to be added to the build path whereas the other is part of the Apache Commons library which need to be added to the classpath.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top