java - 大小为 0 的索引 0 究竟意味着什么?

标签 java sqlite

我在我的应用程序中遇到了这个错误。我只想知道这个错误 exaclty 是什么意思。如果能举个简单的例子来说明一下就好了

最佳答案

它只是意味着你的数组或游标或任何没有任何元素的东西,它的长度是 0。所以

假设

String[] s = {};//not sure if it compiles. just an example for understanding
s[0]//doing this means asking for 1st elemnt when s does't have any..

关于java - 大小为 0 的索引 0 究竟意味着什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7360554/

相关文章:

java - 将集合转换为 java 中的映射

mysql - 如何从表中的列中删除 '00:00:00'?

java - 如何为不同类型的异常设置不同的状态码

java - 找不到类 'org.apache.http.entity.mime.content.Filebody',从方法中引用

sqlite - 带有 WAL 的 ios7 sqlite 数据库从不同步主数据库文件

android - 无法从 android 上的 SQLite 数据库中检索数据。 (返回一个空的 ArrayList)

android - Sqlite Code(1) 错误,没有这样的列

sql - 使用 SQL 查询对计数进行排名

java - 尝试复制大文件时 NIO 出错

java - 如何将 JavaScript 变量转换为 Java 变量?