如何查找数组列表的长度? [英] How to find the length of an array list?
本文介绍了如何查找数组列表的长度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我不知道如何找到数组列表的长度。我想你可能需要使用 blank.length();
但是我不确定。
I don't know how to find the length of an array list. I think you might need to use blank.length();
but I'm not sure.
我做了数组列表
ArrayList<String> myList = new ArrayList<String>();
但是如何编写代码来打印myList的大小?
but how do I write code to print out the size of myList?
推荐答案
大小成员函数。
myList.size();
http://docs.oracle.com/javase/6/docs/api/java/util/ArrayList.html
这篇关于如何查找数组列表的长度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文