/*
	This is a String array 
*
*/

public class NameAccess
{
	public static void main(String[] args)
	{
		// String array initialization
		String name[] = {"Joe", "Annie", "Tom", "Jay", "Amy"};
		int n = 0;
		
		/*
			Here, we use the length field, we are to determined the size of an array
			
		*
		*/
		for(int i=0; i<name.length; i++)
		{
			n++;
		}
		
		// We are outputting the size of the array
		System.out.println(n);
		
		/*
			Accessing the array using Enhanced for loop
			
		*
		*/
		for(String nam : name)
		{
			System.out.println(nam);
		}
		
		/*
			Accessing the array using traditional for loop
			
		*
		*/
		for(int j=0; j<name.length; j++)
		{
			System.out.println(name[j]);
		}
		
		
	}
}