java - 在活动android中重新启动一个void
问题描述
我正在做一个有 x 个问题的测验应用程序。我尝试在 while 和 for 循环中调用该方法来开始一个新问题:
x=10
while(x>=0){
// void to create question & check;
x-- ;
}
并使用 for 循环:
for (int x=10; x>0;x --){
//void to to create question & check;
}
但 x 总是返回 0。
如何在不重新启动整个活动的情况下在测验中创建新问题?
解决方案
推荐阅读
- java - 在 Android Studio 中使用列表适配器和自定义列表视图时出现 NullPointerExcepter 错误
- c# - 检测 Xamarin Scrollview 何时到达末尾
- c# - 从 SQL 转换为 Linq 时 LINQ 中的替代方法/函数
- python - 在没有任何返回值的非 OOP 代码上运行单元测试
- web-crawler - 是否可以在stormcrawler中按标签爬行?
- scala - leftOuterJoin 抛出 TableException:不支持的连接类型“LEFT”
- mongodb - 在 ubuntu 上安装 mongodb compass 时遇到问题?
- twitter-bootstrap - 什么是让 bootstrap 4 工作的正确方法
- c++ - 具有相同大小和内容的 C++ 字符串比较返回 false
- angular - Ionic - Angular - Ionic-native facebook:预期 2 个参数,但得到 4 个