【发布时间】:2011-05-23 07:22:48
【问题描述】:
questionArray.addObject("Hi honey, I just got to work. What are you upto?");
answerArray.addObject("I was just thinking about you darling.:Just missing you from the time you left.:I was just going through our wedding photos.:Well right now, just talking to you & its giving me a headache.:Nothing much I was just texting my ex-boyfriend.");
subQuestionArray.addObject("What do you mean by that?");
subAnswerArray.addObject("Oh nothing dear, just missing you.:Nothing, just that I think dumping my ex was a mistake.");
statementArray.addObject("Good to know, I've work to do, BYE!");
我遇到了一个错误。 (不能在数组类型 String[] 上调用 addObject(String)) 在 Java 中,questionArray、answerArray、subQuestionAray、statementArray 是字符串数组,应该使用什么来代替 addobject? 我正在使用 Eclipse helios 在 Android 上开发游戏。
【问题讨论】:
-
您在哪里看到可以在数组上使用
.addObject(String s);?我在文档中找不到该方法。 -
其实这是在 iphone xcode 中使用的,我把它转换成 android,所以想要替换上面的..