If I use ArrayAdapter
or ArrayAdapter<String>
, it does not affect my code.
For example, if I write it like:
ArrayAdapter adapter = new ArrayAdapter(getApplicationContext(), android.R.layout.simple_list_item_1, android.R.id.text1, values);
Instead of:
ArrayAdapter<String> adapter = new ArrayAdapter<String>(getApplicationContext(), android.R.layout.simple_list_item_1, android.R.id.text1, values);
Are these two things different? What is the purpose of <String>
here?
I have searched the web and only knew that <String>
shows something like collection?! Not sure.
I am a newbie in Android. Please help.