今日内容:
Vector基础:
package test; import java.util.Vector; public class TestVector { public static void main(String[] args) { Vector vector = new Vector(); System.out.println("容量:"+vector.capacity()); System.out.println("Empty:"+vector.isEmpty()); for(int i=0;i<3;i++){ vector.add(i); } System.out.println(vector); System.out.println("含有的数据个数:"+vector.size()); } } /* 输出: 容量:10 Empty:true [0, 1, 2] 含有的数据个数:3 */
问题:无
明天的打算:继续学习Java