Public synchronized int incContador (int val)

Classified in Computers

Written at on English with a size of 1.45 KB.

public class Review 
{
    private static ArrayList<String> food = new ArrayList<String>();
    private static String[] array;
    public static void main(String[] args) 
    {
        Review x = new Review();
        food.Add("Pizza");
        food.Add("Burger");
        food.Add("Pie");
        food.Set(1,"Popcorn");        
        food.Add(0,"Cake");
        addToArray(food);
        for(int i = 0; i < food.Size(); i++)
{
            System.Out.Println(array[i]);
        }
    }
    public static String[] addToArray(ArrayList<String> y)
     {
        int count = 0;
        array = new String[food.Size()];
        for(String val: y)
{
            array[count] = val;
            count++;
        }
        return array;
    }
}

Entradas relacionadas: