Why doesn't java.util.HashSet have a get(Object o) method?

后端 未结 11 2197
暖寄归人
暖寄归人 2020-12-07 18:39

I\'ve seen other questions about getting objects from Set\'s based on index value and I understand why that is not possible. But I haven\'t been able to find a

11条回答
  •  失恋的感觉
    2020-12-07 19:05

    if you only want know what are in the Hashset, you can use .toString(); method to display all Hashset Contents separated by comma.

提交回复
热议问题