来自sqlite中bool索引的cursor.getString(index_col)

时间:2013-09-24 13:13:16

标签: string sqlite boolean

我有这个大问题。我创建了这个表,但是为bool创建了一个索引。我使用Question.setAnswer(c.getString(2));将bool索引表转换为字符串,如果为True则返回True,如果为False则返回False。这是日志Answer found in DB: True,这是它背后的代码:Log.d("QUESTION", "Answer Found in DB: " + c.getString(2));这就是令人困惑的地方。

if(Question.getAnswer() == "True") Question.rightCo++

但无论Question.getAnswer()的值是什么,它都不会增加rightCo

似乎有什么问题?提前致谢

0 个答案:

没有答案