Android studiov4.2のメインクラス内でパブリッククラスのダウンロードを宣言できません
public class MainActivity extends AppCompatActivity {
//Intialistion of variables:
ListView listView;
ArrayList<String> arrayList = new ArrayList<String>();
ArrayAdapter arrayAdapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//declaration of variables :
listView = findViewById(R.id.ListView);
arrayAdapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1);
listView.setAdapter(arrayAdapter);
public class Download extends AsyncTask<String,Void,String>{
@Override
protected String doInBackground(String... strings) {
return null;
}
}
}
}
[Screenshot of error is attached see it for refrence][1]
[1]: https://i.stack.imgur.com/DbqDY.png
エラー - 修飾子 'public' はここでは許可されていません