在 google 上找不到任何真正的答案。
最佳答案
文档清楚地说明了这一点:
[setElementAt] is identical in functionality to the set(int, E) method (which is part of the List interface). Note that the set method reverses the order of the parameters, to more closely match array usage. Note also that the set method returns the old value that was stored at the specified position.
http://download.oracle.com/javase/6/docs/api/java/util/Vector.html
编辑:我在 Google 中搜索 Java 文档的方式非常简单。我输入 java 6 api String
(将 String 替换为您想知道的任何类),它通常是第一个命中。
关于java - java vector 方法set()和setElementAt()有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4346993/