Java tutorial
//package com.java2s; import java.util.LinkedList; import java.util.List; import android.app.Activity; public class Main { private static List<Activity> sActivitiesList; private static synchronized List<Activity> getActivityList() { if (sActivitiesList == null) { sActivitiesList = new LinkedList<Activity>(); } return sActivitiesList; } }