我正在尝试从偏好中找到一组长度.我厌倦了 set.length,但它不起作用.任何人都知道另一种方法来找到一个集合的长度?
I'm trying to find the lentgh of a set from a preference. I tired set.length, but it doesnt work. Anyone know another way to find a length of a set?
set = prefs.getStringSet("key", null);
int X = set.length; //it doesn't like length....
我相信你会想调用 set.size()
这篇关于如何找到集合的长度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!