1. Open the MainActivity.java file and add the below line to the imports section.
import java.util.List;
import java.util.ArrayList;
2. In the onCreate method, add the following line to create String List Array. This will declare a List variable called myList.
List<String> myList;
3. Add the bold line below to the onCreate method.
myList = new ArrayList<String>();
4. Compile and run!
Resources:
http://developer.android.com/reference/java/util/ArrayList.html
http://java67.blogspot.com/2012/12/how-to-create-and-initialize-list-arraylist-same-line.html
http://stackoverflow.com/questions/16432956/how-to-search-files-based-on-type
http://java67.blogspot.com/2012/12/how-to-create-and-initialize-list-arraylist-same-line.html
http://stackoverflow.com/questions/16432956/how-to-search-files-based-on-type