gpt4 book ai didi

java - java vector 方法set()和setElementAt()有什么区别?

转载 作者:行者123 更新时间:2023-12-01 06:59:03 24 4
gpt4 key购买 nike

在 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com