Q: Android, Creating an arraylist of .mp3 files? I want to create an arraylist of .mp3 files and strings. If a string in the arraylist is called by a randomnumber than a specific mp3 file will play. Could I make an arraylist filled with both .mp3 files and Strings so they can be called simultaneously or would I make seperate arrayLists. Or maybe not even use an ArrayList of .mp3 files? Thank You.
ArrayList<String? words = new ArrayList<String>
words.add("Hello World");

//On Button Click
//Generates randomNumber Integer
//randomNumber=1
//SetText to "Hello World" and play .mp3 that says "Hello World" simultaneously and put thread to sleep for .mp3 length

How is the best way to achieve this with least amount of hardcoding?

A: What you want is a Map that correlates the Strings to the MP3 file paths. 

A: You can create your own custom arraylist of objects as follows..
public class SongInfo
{
    String songName;
    String songPath;


    public SongInfo(String songName,String songPath){
        this.songName = songName;
        this.songPath = songPath;

    }
}

ArrayList<SongInfo> customSongList = new ArrayList<SongInfo>();


A: Make your own Song Object and pickup songs from it randomly 
public class Player {

    public static void main(String[] args) {
        Player player = new Player();
        //populate music in your arrayList
        List<Song> album = player.populateMusicList();
        //play
        for (int i = 0; i < 10; i++) {
            player.play(album);
        }
    }

    public void play(List<Song> album) {
        System.out.println("playing --" + album.get(this.fetchMusicRandomly(album)));
    }

    private int fetchMusicRandomly(List<Song> album) {
        return ThreadLocalRandom.current().nextInt(0, album.size());
    }

    private List<Song> populateMusicList() {
        List<Song> musicBucket = new ArrayList<Song>();
        musicBucket.add(new Song("musicName-1", "pathtomp3File"));
        musicBucket.add(new Song("musicName-2", "pathtomp3File"));
        musicBucket.add(new Song("musicName-3", "pathtomp3File"));
        musicBucket.add(new Song("musicName-4", "pathtomp3File"));
        musicBucket.add(new Song("musicName-5", "pathtomp3File"));
        musicBucket.add(new Song("musicName-6", "pathtomp3File"));
        musicBucket.add(new Song("musicName-7", "pathtomp3File"));
        musicBucket.add(new Song("musicName-8", "pathtomp3File"));
        musicBucket.add(new Song("musicName-9", "pathtomp3File"));
        musicBucket.add(new Song("musicName-10", "pathtomp3File"));
        return musicBucket;
    }

    class Song {

        public Song(String name, String pathToMp3) {
            this.name = name;
            this.pathToMp3 = pathToMp3;
        }
        String name;
        String pathToMp3;

        public String getName() {
            return name;
        }

        public String getPathToMp3() {
            return pathToMp3;
        }

        @Override
        public String toString() {
            StringBuilder result = new StringBuilder();
            result.append(" {Name: " + name + " }");
            result.append(" {Path To Mp3file: " + pathToMp3);
            result.append("}");
            return result.toString();
        }
    }
}

