CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
不看会后悔的Windows XP之经验谈 简单快捷DIY实用家庭影院
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Java >  J2SE / 基础类

在java中vector代表什么意思?大大帮忙,一定给分

楼主greatsuoer(英雄索尔)2002-01-16 11:15:12 在 Java / J2SE / 基础类 提问

不是java没有指针么? 问题点数:20、回复次数:8Top

1 楼Patrick_DK(我有我的调调,就是这么屌)回复于 2002-01-16 11:18:11 得分 2

vector 向量,存放对象的可变数组Top

2 楼skyyoung(路人甲)回复于 2002-01-16 11:21:20 得分 2

java.util    
  Class   Vector  
  java.lang.Object  
      |  
      +--java.util.AbstractCollection  
                  |  
                  +--java.util.AbstractList  
                              |  
                              +--java.util.Vector  
   
  All   Implemented   Interfaces:    
  Cloneable,   Collection,   List,   RandomAccess,   Serializable    
  Direct   Known   Subclasses:    
  Stack    
   
  --------------------------------------------------------------------------------  
   
  public   class   Vector  
  extends   AbstractList  
  implements   List,   RandomAccess,   Cloneable,   Serializable  
  The   Vector   class   implements   a   growable   array   of   objects.   Like   an   array,   it   contains   components   that   can   be   accessed   using   an   integer   index.   However,   the   size   of   a   Vector   can   grow   or   shrink   as   needed   to   accommodate   adding   and   removing   items   after   the   Vector   has   been   created.  
   
  Each   vector   tries   to   optimize   storage   management   by   maintaining   a   capacity   and   a   capacityIncrement.   The   capacity   is   always   at   least   as   large   as   the   vector   size;   it   is   usually   larger   because   as   components   are   added   to   the   vector,   the   vector's   storage   increases   in   chunks   the   size   of   capacityIncrement.   An   application   can   increase   the   capacity   of   a   vector   before   inserting   a   large   number   of   components;   this   reduces   the   amount   of   incremental   reallocation.    
   
  As   of   the   Java   2   platform   v1.2,   this   class   has   been   retrofitted   to   implement   List,   so   that   it   becomes   a   part   of   Java's   collection   framework.   Unlike   the   new   collection   implementations,   Vector   is   synchronized.  
   
  The   Iterators   returned   by   Vector's   iterator   and   listIterator   methods   are   fail-fast:   if   the   Vector   is   structurally   modified   at   any   time   after   the   Iterator   is   created,   in   any   way   except   through   the   Iterator's   own   remove   or   add   methods,   the   Iterator   will   throw   a   ConcurrentModificationException.   Thus,   in   the   face   of   concurrent   modification,   the   Iterator   fails   quickly   and   cleanly,   rather   than   risking   arbitrary,   non-deterministic   behavior   at   an   undetermined   time   in   the   future.   The   Enumerations   returned   by   Vector's   elements   method   are   not   fail-fast.    
   
   
   
  Since:  
  JDK1.0    
  See   Also:  
  Collection,   List,   ArrayList,   LinkedList,   Serialized   Form  
  Top

3 楼zero_wgh(traffic_light)回复于 2002-01-16 11:25:58 得分 2

一数据结构,类似与数组,但其长度可变Top

4 楼bookbobby(书呆)回复于 2002-01-16 11:25:59 得分 4

表示矢量  
   
  可以用来代替数组  
   
  主要不同是vector的长度可以自动增长  
   
  而数组不行Top

5 楼liukuncn(爱,还记得么?)回复于 2002-01-16 11:47:10 得分 2

普通数组长度不可变,而vector长度可变,但它只能存储对象Top

6 楼wuhuafu()回复于 2002-01-16 14:24:02 得分 4

类似于集合。可作为动态数组使用。可以存储任何内容,同一个Vector可以存储Integer,String,以及任何类(包括Vector)。可以实现复杂的数据结构  
  为了存储一个简单类型,需要转为一个对象,eg:int->IntegerTop

7 楼wuhuafu()回复于 2002-01-16 14:25:43 得分 2

可以说java的应用是安全指针!Top

8 楼night_knight(黑夜骑士只抽红河)回复于 2002-01-16 15:39:15 得分 2

象hashmapTop

相关问题

  • 请问下面这个java语句段代表什么意思
  • 这代表什么意思..???
  • "?"代表什么意思?dw_1.describe("value.values")
  • "%3d" 3代表什么意思啊?
  • PB的refrence代表的意思
  • OA,ERP代表什么意思呀
  • 在jsp文件中, this代表的意思???
  • 请问 |= 代表什么意思?
  • 请问_T()代表什么意思呢?
  • char ContentSeperator = (char)6 代表什么意思?

关键词

  • vector
  • 数组
  • 长度
  • iterator
  • capacity
  • collection
  • util
  • fail
  • implement
  • components

得分解答快速导航

  • 帖主:greatsuoer
  • Patrick_DK
  • skyyoung
  • zero_wgh
  • bookbobby
  • liukuncn
  • wuhuafu
  • wuhuafu
  • night_knight

相关链接

  • CSDN Java频道
  • Java类图书
  • Java类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo