Java tutorial
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; public class Main { public static String[] getOccupantsIdsArrayFromList(ArrayList<Integer> occupantsList) { String[] occupantsArray = new String[occupantsList.size()]; for (int i = 0; i < occupantsList.size(); i++) { occupantsArray[i] = String.valueOf(occupantsList.get(i)); } return occupantsArray; } }