Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设我有一个具有以下值的集合:A、B、C、D。有没有一种简单的方法可以获得包含 AB、AC、AD、BC、BD、CD 的集合?
在 Ruby 中,我可以直接使用组合函数来做到这一点。有关如何在 Java 中执行此操作的任何建议?
它不是内置在语言或标准库中的,因此您必须按照本示例的行编写一些内容。