Java tutorial
//package com.java2s; import java.util.ArrayList; import android.content.Context; import android.widget.Toast; public class Main { private static ArrayList<String> messages = new ArrayList<String>(); public static void show(Context context, Integer duration) { if (duration == null) duration = Toast.LENGTH_LONG; for (String msg : messages) { Toast.makeText(context, msg, duration).show(); } } }