这应该是一个相当简单的问题来回答。我环顾四周,找不到任何有关此语法的主题,并且“...”在Google上搜索它很困难。我正在研究一个简单的测试应用程序,用于将数据库文件从未受保护的Android手机上的受保护位置复制到SD卡上的一个位置,我可以通过该位置查看sqlite3 database viewing tool。我知道这似乎是一种迂回的做事方式,但模拟器拒绝在我的上网本上打开,所以我现在用我的手机来测试开发。语法“final String ... args”是什么意思/做什么?
该代码已被写入,所以我borrowing it from here并适应它到我的代码。我遇到的这个代码小片段:
private class ExportDatabaseFileTask extends AsyncTask<String, Void, Boolean> {
private final ProgressDialog dialog = new ProgressDialog(ManageData.this);
// can use UI thread here
protected void onPreExecute() {
this.dialog.setMessage("Exporting database...");
this.dialog.show();
}
// automatically done on worker thread (separate from UI thread)
protected Boolean doInBackground(final String... args) {
我从来没有见过的说法final String... args
之前。这意味着什么?
谢谢! Moscro
非常好,谢谢大家的帮忙! – moscro 2011-02-26 05:27:29