Creating an array of Sets in Java

后端 未结 3 395
粉色の甜心
粉色の甜心 2021-02-02 15:13

I\'m new to Java so I\'m probably doing something wrong here, I want to create an array of Sets and I get an error (from Eclipse). I have a class:

public class R         


        
3条回答
  •  执笔经年
    2021-02-02 15:18

    You might want to consider using Guava's Multimap where the key is the index. This will handle creating the Sets for each index as you need them.

    SetMultimap

    SetMultimap groupMembers;
    

提交回复
热议问题