return a series of print statements within a for loop
<p>I have a class which contains an array list of which the user will enter its elements. I think I can successfully add elements to this array list but I cannot tell as I cannot output the array list. I want to call the method viewNYC in the main programme and for it to display a list of its elements in cmd prompt. Can any one help?</p>

<pre><code>import java.util.*;

class Hotels{

    public static ArrayList NYC = new ArrayList();

    public static String[] NYCArray = (String[])NYC.toArray(new String[NYC.size()]);

    public static void addNYC(String hotel){
        String NYChotel = hotel;
        NYC.add(NYChotel);
    }


    public static void viewNYC(){   //Will be called in main programme

        for(int i=0; i&lt; NYCArray.length; i++){
            return System.out.println(i+1 + ") \t" + NYCArray[i]);
        }
    }
}   
</code></pre>
